Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Bump Rust to 1.91.1 (#42561)
Piotr Osiewicz6b239c3a9a49
diff --git a/Dockerfile-collab b/Dockerfile-collabindex a85fe93f198..4bc369140e7 100644--- a/Dockerfile-collab+++ b/Dockerfile-collab@@ -1,6 +1,6 @@# syntax = docker/dockerfile:1.2-FROM rust:1.90-bookworm as builder+FROM rust:1.91.1-bookworm as builderWORKDIR appCOPY . .diff --git a/crates/call/src/call_impl/room.rs b/crates/call/src/call_impl/room.rsindex e659d1cf05b..2a540619d45 100644--- a/crates/call/src/call_impl/room.rs+++ b/crates/call/src/call_impl/room.rs@@ -1683,7 +1683,9 @@ impl LiveKitRoom {}}+#[derive(Default)]enum LocalTrack<Stream: ?Sized> {+ #[default]None,Pending {publish_id: usize,@@ -1694,12 +1696,6 @@ enum LocalTrack<Stream: ?Sized> {},}-impl<T: ?Sized> Default for LocalTrack<T> {- fn default() -> Self {- Self::None- }-}-#[derive(Copy, Clone, PartialEq, Eq)]pub enum RoomStatus {Online,diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 04d8794169d..2da80a405a0 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -1300,8 +1300,9 @@ struct SelectionHistoryEntry {add_selections_state: Option<AddSelectionsState>,}-#[derive(Copy, Clone, Debug, PartialEq, Eq)]+#[derive(Copy, Clone, Default, Debug, PartialEq, Eq)]enum SelectionHistoryMode {+ #[default]Normal,Undoing,Redoing,@@ -1314,12 +1315,6 @@ struct HoveredCursor {selection_id: usize,}-impl Default for SelectionHistoryMode {- fn default() -> Self {- Self::Normal- }-}-#[derive(Debug)]/// SelectionEffects controls the side-effects of updating the selection.///diff --git a/crates/gpui/src/interactive.rs b/crates/gpui/src/interactive.rsindex 8659433278d..9e18b7990d9 100644--- a/crates/gpui/src/interactive.rs+++ b/crates/gpui/src/interactive.rs@@ -305,9 +305,10 @@ pub enum KeyboardButton {}/// An enum representing the mouse button that was pressed.-#[derive(Hash, PartialEq, Eq, Copy, Clone, Debug)]+#[derive(Hash, Default, PartialEq, Eq, Copy, Clone, Debug)]pub enum MouseButton {/// The left mouse button.+ #[default]Left,/// The right mouse button.@@ -333,28 +334,17 @@ impl MouseButton {}}-impl Default for MouseButton {- fn default() -> Self {- Self::Left- }-}-/// A navigation direction, such as back or forward.-#[derive(Hash, PartialEq, Eq, Copy, Clone, Debug)]+#[derive(Hash, Default, PartialEq, Eq, Copy, Clone, Debug)]pub enum NavigationDirection {/// The back button.+ #[default]Back,/// The forward button.Forward,}-impl Default for NavigationDirection {- fn default() -> Self {- Self::Back- }-}-/// A mouse move event from the platform.#[derive(Clone, Debug, Default)]pub struct MouseMoveEvent {diff --git a/crates/gpui/src/platform.rs b/crates/gpui/src/platform.rsindex 04ae4480faf..e50f407dc31 100644--- a/crates/gpui/src/platform.rs+++ b/crates/gpui/src/platform.rs@@ -1346,11 +1346,12 @@ pub enum WindowKind {////// On macOS, this corresponds to named [`NSAppearance`](https://developer.apple.com/documentation/appkit/nsappearance)/// values.-#[derive(Copy, Clone, Debug, PartialEq, Eq)]+#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]pub enum WindowAppearance {/// A light appearance.////// On macOS, this corresponds to the `aqua` appearance.+ #[default]Light,/// A light appearance with vibrant colors.@@ -1369,12 +1370,6 @@ pub enum WindowAppearance {VibrantDark,}-impl Default for WindowAppearance {- fn default() -> Self {- Self::Light- }-}-/// The appearance of the background of the window itself, when there is/// no content or the content is transparent.#[derive(Copy, Clone, Debug, Default, PartialEq)]@@ -1475,9 +1470,10 @@ impl From<&str> for PromptButton {}/// The style of the cursor (pointer)-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, JsonSchema)]+#[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, JsonSchema)]pub enum CursorStyle {/// The default cursor+ #[default]Arrow,/// A text input cursor@@ -1564,12 +1560,6 @@ pub enum CursorStyle {None,}-impl Default for CursorStyle {- fn default() -> Self {- Self::Arrow- }-}-/// A clipboard item that should be copied to the clipboard#[derive(Clone, Debug, Eq, PartialEq)]pub struct ClipboardItem {diff --git a/crates/gpui/src/tab_stop.rs b/crates/gpui/src/tab_stop.rsindex 8a95a3975af..a2050059634 100644--- a/crates/gpui/src/tab_stop.rs+++ b/crates/gpui/src/tab_stop.rs@@ -320,7 +320,7 @@ mod tests {let focus_map = Arc::new(FocusMap::default());let mut tab_index_map = TabStopMap::default();- let focus_handles = vec![+ let focus_handles = [FocusHandle::new(&focus_map).tab_stop(true).tab_index(0),FocusHandle::new(&focus_map).tab_stop(true).tab_index(1),FocusHandle::new(&focus_map).tab_stop(true).tab_index(1),diff --git a/crates/settings/src/settings_content/language_model.rs b/crates/settings/src/settings_content/language_model.rsindex a0aa57a970c..50ad812142e 100644--- a/crates/settings/src/settings_content/language_model.rs+++ b/crates/settings/src/settings_content/language_model.rs@@ -388,19 +388,14 @@ pub struct OpenRouterProvider {sort: Option<String>,}-#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema, MergeFrom)]+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, JsonSchema, MergeFrom)]#[serde(rename_all = "lowercase")]pub enum DataCollection {+ #[default]Allow,Disallow,}-impl Default for DataCollection {- fn default() -> Self {- Self::Allow- }-}-fn default_true() -> bool {true}diff --git a/crates/text/src/selection.rs b/crates/text/src/selection.rsindex e690792d0c9..349d557fab8 100644--- a/crates/text/src/selection.rs+++ b/crates/text/src/selection.rs@@ -2,11 +2,15 @@ use crate::{Anchor, BufferSnapshot, TextDimension};use std::cmp::Ordering;use std::ops::Range;-#[derive(Copy, Clone, Debug, PartialEq)]+#[derive(Default, Copy, Clone, Debug, PartialEq)]pub enum SelectionGoal {+ #[default]None,HorizontalPosition(f64),- HorizontalRange { start: f64, end: f64 },+ HorizontalRange {+ start: f64,+ end: f64,+ },WrappedHorizontalPosition((u32, f32)),}@@ -19,12 +23,6 @@ pub struct Selection<T> {pub goal: SelectionGoal,}-impl Default for SelectionGoal {- fn default() -> Self {- Self::None- }-}-impl<T: Clone> Selection<T> {/// A place where the selection had stopped at.pub fn head(&self) -> T {diff --git a/crates/vim/src/state.rs b/crates/vim/src/state.rsindex 3f4fc99584f..8a7b8534927 100644--- a/crates/vim/src/state.rs+++ b/crates/vim/src/state.rs@@ -38,8 +38,9 @@ use util::rel_path::RelPath;use workspace::searchable::Direction;use workspace::{Workspace, WorkspaceDb, WorkspaceId};-#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]+#[derive(Clone, Copy, Default, Debug, PartialEq, Serialize, Deserialize)]pub enum Mode {+ #[default]Normal,Insert,Replace,@@ -78,12 +79,6 @@ impl Mode {}}-impl Default for Mode {- fn default() -> Self {- Self::Normal- }-}-#[derive(Clone, Debug, PartialEq)]pub enum Operator {Change,diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rsindex d85662733d5..3965aeb4211 100644--- a/crates/workspace/src/pane.rs+++ b/crates/workspace/src/pane.rs@@ -422,8 +422,9 @@ struct NavHistoryState {next_timestamp: Arc<AtomicUsize>,}-#[derive(Debug, Copy, Clone)]+#[derive(Debug, Default, Copy, Clone)]pub enum NavigationMode {+ #[default]Normal,GoingBack,GoingForward,@@ -432,12 +433,6 @@ pub enum NavigationMode {Disabled,}-impl Default for NavigationMode {- fn default() -> Self {- Self::Normal- }-}-pub struct NavigationEntry {pub item: Arc<dyn WeakItemHandle>,pub data: Option<Box<dyn Any + Send>>,diff --git a/flake.lock b/flake.lockindex ced528afa60..3074b947ef5 100644--- a/flake.lock+++ b/flake.lock@@ -2,11 +2,11 @@"nodes": {"crane": {"locked": {- "lastModified": 1758215636,- "narHash": "sha256-8nkzkPbdxze8CxWhKWlcLbJEU1vfLM/nVqRlTy17V54=",+ "lastModified": 1762538466,+ "narHash": "sha256-8zrIPl6J+wLm9MH5ksHcW7BUHo7jSNOu0/hA0ohOOaM=","owner": "ipetkov","repo": "crane",- "rev": "a669fe77a8b0cd6f11419d89ea45a16691ca5121",+ "rev": "0cea393fffb39575c46b7a0318386467272182fe","type": "github"},"original": {@@ -17,11 +17,11 @@},"flake-compat": {"locked": {- "lastModified": 1747046372,- "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",+ "lastModified": 1761588595,+ "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=","owner": "edolstra","repo": "flake-compat",- "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",+ "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5","type": "github"},"original": {@@ -33,10 +33,10 @@"nixpkgs": {"locked": {"lastModified": 315532800,- "narHash": "sha256-YPoFUJMpbuPvIS4FJBn2Sv/iWsui9S26gu2ufFWEY0g=",- "rev": "a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0",+ "narHash": "sha256-5CwQ80ucRHiqVbMEEbTFnjz70/axSJ0aliyzSaFSkmY=",+ "rev": "f6b44b2401525650256b977063dbcf830f762369","type": "tarball",- "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre864673.a1f79a1770d0/nixexprs.tar.xz"+ "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre891648.f6b44b240152/nixexprs.tar.xz"},"original": {"type": "tarball",@@ -58,11 +58,11 @@]},"locked": {- "lastModified": 1758508617,- "narHash": "sha256-kx2uELmVnAbiekj/YFfWR26OXqXedImkhe2ocnbumTA=",+ "lastModified": 1762915112,+ "narHash": "sha256-d9j1g8nKmYDHy+/bIOPQTh9IwjRliqaTM0QLHMV92Ic=","owner": "oxalica","repo": "rust-overlay",- "rev": "d2bac276ac7e669a1f09c48614538a37e3eb6d0f",+ "rev": "aa1e85921cfa04de7b6914982a94621fbec5cc02","type": "github"},"original": {diff --git a/rust-toolchain.toml b/rust-toolchain.tomlindex 6ef0865182f..59765d94abe 100644--- a/rust-toolchain.toml+++ b/rust-toolchain.toml@@ -1,5 +1,5 @@[toolchain]-channel = "1.90"+channel = "1.91.1"profile = "minimal"components = [ "rustfmt", "clippy" ]targets = [