From 6b239c3a9a496bf622e801a3a4a3a77f73add2c1 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 12 Nov 2025 21:27:04 +0100 Subject: [PATCH] Bump Rust to 1.91.1 (#42561) Release Notes: - N/A --------- Co-authored-by: Julia Ryan --- Dockerfile-collab | 2 +- crates/call/src/call_impl/room.rs | 8 ++----- crates/editor/src/editor.rs | 9 ++----- crates/gpui/src/interactive.rs | 18 ++++---------- crates/gpui/src/platform.rs | 18 ++++---------- crates/gpui/src/tab_stop.rs | 2 +- .../src/settings_content/language_model.rs | 9 ++----- crates/text/src/selection.rs | 14 +++++------ crates/vim/src/state.rs | 9 ++----- crates/workspace/src/pane.rs | 9 ++----- flake.lock | 24 +++++++++---------- rust-toolchain.toml | 2 +- 12 files changed, 39 insertions(+), 85 deletions(-) diff --git a/Dockerfile-collab b/Dockerfile-collab index a85fe93f198475534cb7396abe594f9d02eeb57b..4bc369140e79219b9719b570659e9edd27453260 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 builder WORKDIR app COPY . . diff --git a/crates/call/src/call_impl/room.rs b/crates/call/src/call_impl/room.rs index e659d1cf05b228423796d4c48906d568d71770d9..2a540619d4576ec7fcf711b288ecc12bf89fd20c 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 { + #[default] None, Pending { publish_id: usize, @@ -1694,12 +1696,6 @@ enum LocalTrack { }, } -impl Default for LocalTrack { - 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.rs index 04d8794169ddcc0410f122c0d56124c7e5bcc254..2da80a405a0db357712039f06d10c9e6b33e05c8 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -1300,8 +1300,9 @@ struct SelectionHistoryEntry { add_selections_state: Option, } -#[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.rs index 8659433278d13c84a11312127639f700bfbb9cdc..9e18b7990d9a30f2fd5e50010766d5f14a33e4e2 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.rs index 04ae4480faf08015f6e4b6e62e7210b55997e3d4..e50f407dc313038032c433aa0243d3c7791c5c1f 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.rs index 8a95a3975af736d544e01cbf6e212994b8e7e8c6..a2050059634d202490e7156830fbe579d48c47ab 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.rs index a0aa57a970c2483e4d9c617506d7b869c223cdf0..50ad812142e1544d2fa7947d4c6a845c6d459090 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, } -#[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.rs index e690792d0c903031f8fc7e8bf81215bf0db0e336..349d557fab8c980901149698223cae78739797d8 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 { pub goal: SelectionGoal, } -impl Default for SelectionGoal { - fn default() -> Self { - Self::None - } -} - impl Selection { /// 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.rs index 3f4fc99584f96754afc5342d299a502eb9a3dbad..8a7b85349273176f67e8eed8b6939ef047f83b4c 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.rs index d85662733d52390db820957818901fa2e2cfd2a2..3965aeb4211cf8834bbcf4e52709f2abf09343fd 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -422,8 +422,9 @@ struct NavHistoryState { next_timestamp: Arc, } -#[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, pub data: Option>, diff --git a/flake.lock b/flake.lock index ced528afa60cb567b291c6962c80e503845b08fc..3074b947ef51c387b5d20aba85478636f48de557 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.toml index 6ef0865182f1d5ef79cebdcbeacd52d5f71b72ae..59765d94abe9c04e6668203de31b598dd6b34dc7 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 = [