chore: Bump Rust to 1.87 (#30739)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-05-16 00:28:52 +02:00 committed by GitHub
parent a316428686
commit 0f17e82154
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 33 additions and 45 deletions

View file

@ -788,6 +788,9 @@ let_underscore_future = "allow"
# running afoul of the borrow checker. # running afoul of the borrow checker.
too_many_arguments = "allow" too_many_arguments = "allow"
# We often have large enum variants yet we rarely actually bother with splitting them up.
large_enum_variant = "allow"
[workspace.metadata.cargo-machete] [workspace.metadata.cargo-machete]
ignored = [ ignored = [
"bindgen", "bindgen",

View file

@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.2 # syntax = docker/dockerfile:1.2
FROM rust:1.86-bookworm as builder FROM rust:1.87-bookworm as builder
WORKDIR app WORKDIR app
COPY . . COPY . .

View file

@ -30,7 +30,6 @@ pub(crate) struct ConfigureContextServerModal {
context_server_store: Entity<ContextServerStore>, context_server_store: Entity<ContextServerStore>,
} }
#[allow(clippy::large_enum_variant)]
enum Configuration { enum Configuration {
NotAvailable, NotAvailable,
Required(ConfigurationRequiredState), Required(ConfigurationRequiredState),

View file

@ -1249,7 +1249,7 @@ pub struct ActiveDiagnosticGroup {
} }
#[derive(Debug, PartialEq, Eq)] #[derive(Debug, PartialEq, Eq)]
#[allow(clippy::large_enum_variant)]
pub(crate) enum ActiveDiagnostic { pub(crate) enum ActiveDiagnostic {
None, None,
All, All,

View file

@ -543,7 +543,7 @@ pub struct MembershipUpdated {
/// The result of setting a member's role. /// The result of setting a member's role.
#[derive(Debug)] #[derive(Debug)]
#[allow(clippy::large_enum_variant)]
pub enum SetMemberRoleResult { pub enum SetMemberRoleResult {
InviteUpdated(Channel), InviteUpdated(Channel),
MembershipUpdated(MembershipUpdated), MembershipUpdated(MembershipUpdated),

View file

@ -36,6 +36,7 @@ use util::{ResultExt as _, maybe};
const VERSION: &str = env!("CARGO_PKG_VERSION"); const VERSION: &str = env!("CARGO_PKG_VERSION");
const REVISION: Option<&'static str> = option_env!("GITHUB_SHA"); const REVISION: Option<&'static str> = option_env!("GITHUB_SHA");
#[expect(clippy::result_large_err)]
#[tokio::main] #[tokio::main]
async fn main() -> Result<()> { async fn main() -> Result<()> {
if let Err(error) = env::load_dotenv() { if let Err(error) = env::load_dotenv() {

View file

@ -36,8 +36,8 @@ fn room_participants(room: &Entity<Room>, cx: &mut TestAppContext) -> RoomPartic
room.read_with(cx, |room, _| { room.read_with(cx, |room, _| {
let mut remote = room let mut remote = room
.remote_participants() .remote_participants()
.iter() .values()
.map(|(_, participant)| participant.user.github_login.clone()) .map(|participant| participant.user.github_login.clone())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let mut pending = room let mut pending = room
.pending_participants() .pending_participants()

View file

@ -39,7 +39,6 @@ pub struct StackFrameList {
_refresh_task: Task<()>, _refresh_task: Task<()>,
} }
#[allow(clippy::large_enum_variant)]
#[derive(Debug, PartialEq, Eq)] #[derive(Debug, PartialEq, Eq)]
pub enum StackFrameEntry { pub enum StackFrameEntry {
Normal(dap::StackFrame), Normal(dap::StackFrame),

View file

@ -40,7 +40,6 @@ pub const MENU_ASIDE_X_PADDING: Pixels = px(16.);
pub const MENU_ASIDE_MIN_WIDTH: Pixels = px(260.); pub const MENU_ASIDE_MIN_WIDTH: Pixels = px(260.);
pub const MENU_ASIDE_MAX_WIDTH: Pixels = px(500.); pub const MENU_ASIDE_MAX_WIDTH: Pixels = px(500.);
#[allow(clippy::large_enum_variant)]
pub enum CodeContextMenu { pub enum CodeContextMenu {
Completions(CompletionsMenu), Completions(CompletionsMenu),
CodeActions(CodeActionsMenu), CodeActions(CodeActionsMenu),
@ -928,7 +927,6 @@ impl CodeActionContents {
} }
} }
#[allow(clippy::large_enum_variant)]
#[derive(Clone)] #[derive(Clone)]
pub enum CodeActionsItem { pub enum CodeActionsItem {
Task(TaskSourceKind, ResolvedTask), Task(TaskSourceKind, ResolvedTask),

View file

@ -282,7 +282,6 @@ struct Transform {
block: Option<Block>, block: Option<Block>,
} }
#[allow(clippy::large_enum_variant)]
#[derive(Clone)] #[derive(Clone)]
pub enum Block { pub enum Block {
Custom(Arc<CustomBlock>), Custom(Arc<CustomBlock>),

View file

@ -1311,7 +1311,7 @@ pub struct ActiveDiagnosticGroup {
} }
#[derive(Debug, PartialEq, Eq)] #[derive(Debug, PartialEq, Eq)]
#[allow(clippy::large_enum_variant)]
pub(crate) enum ActiveDiagnostic { pub(crate) enum ActiveDiagnostic {
None, None,
All, All,
@ -20278,8 +20278,8 @@ impl EditorSnapshot {
let participant_indices = collaboration_hub.user_participant_indices(cx); let participant_indices = collaboration_hub.user_participant_indices(cx);
let collaborators_by_peer_id = collaboration_hub.collaborators(cx); let collaborators_by_peer_id = collaboration_hub.collaborators(cx);
let collaborators_by_replica_id = collaborators_by_peer_id let collaborators_by_replica_id = collaborators_by_peer_id
.iter() .values()
.map(|(_, collaborator)| (collaborator.replica_id, collaborator)) .map(|collaborator| (collaborator.replica_id, collaborator))
.collect::<HashMap<_, _>>(); .collect::<HashMap<_, _>>();
self.buffer_snapshot self.buffer_snapshot
.selections_in_range(range, false) .selections_in_range(range, false)

View file

@ -6393,7 +6393,6 @@ pub(crate) struct LineWithInvisibles {
font_size: Pixels, font_size: Pixels,
} }
#[allow(clippy::large_enum_variant)]
enum LineFragment { enum LineFragment {
Text(ShapedLine), Text(ShapedLine),
Element { Element {

View file

@ -983,7 +983,7 @@ impl Clipboard {
// format that the contents can be converted to // format that the contents can be converted to
format_atoms[0..IMAGE_FORMAT_COUNT].copy_from_slice(&image_format_atoms); format_atoms[0..IMAGE_FORMAT_COUNT].copy_from_slice(&image_format_atoms);
format_atoms[IMAGE_FORMAT_COUNT..].copy_from_slice(&text_format_atoms); format_atoms[IMAGE_FORMAT_COUNT..].copy_from_slice(&text_format_atoms);
debug_assert!(!format_atoms.iter().any(|&a| a == atom_none)); debug_assert!(!format_atoms.contains(&atom_none));
let result = self.inner.read(&format_atoms, selection)?; let result = self.inner.read(&format_atoms, selection)?;

View file

@ -1858,9 +1858,9 @@ impl LanguageScope {
pub fn language_allowed(&self, name: &LanguageServerName) -> bool { pub fn language_allowed(&self, name: &LanguageServerName) -> bool {
let config = &self.language.config; let config = &self.language.config;
let opt_in_servers = &config.scope_opt_in_language_servers; let opt_in_servers = &config.scope_opt_in_language_servers;
if opt_in_servers.iter().any(|o| *o == *name) { if opt_in_servers.contains(name) {
if let Some(over) = self.config_override() { if let Some(over) = self.config_override() {
over.opt_into_language_servers.iter().any(|o| *o == *name) over.opt_into_language_servers.contains(name)
} else { } else {
false false
} }

View file

@ -1620,7 +1620,7 @@ impl OutlinePanel {
.get(&external_file.buffer_id) .get(&external_file.buffer_id)
.into_iter() .into_iter()
.flat_map(|excerpts| { .flat_map(|excerpts| {
excerpts.iter().map(|(excerpt_id, _)| { excerpts.keys().map(|excerpt_id| {
CollapsedEntry::Excerpt( CollapsedEntry::Excerpt(
external_file.buffer_id, external_file.buffer_id,
*excerpt_id, *excerpt_id,
@ -1641,7 +1641,7 @@ impl OutlinePanel {
entries.extend( entries.extend(
self.excerpts.get(&file.buffer_id).into_iter().flat_map( self.excerpts.get(&file.buffer_id).into_iter().flat_map(
|excerpts| { |excerpts| {
excerpts.iter().map(|(excerpt_id, _)| { excerpts.keys().map(|excerpt_id| {
CollapsedEntry::Excerpt(file.buffer_id, *excerpt_id) CollapsedEntry::Excerpt(file.buffer_id, *excerpt_id)
}) })
}, },

View file

@ -64,7 +64,6 @@ pub enum DapStoreEvent {
RemoteHasInitialized, RemoteHasInitialized,
} }
#[allow(clippy::large_enum_variant)]
enum DapStoreMode { enum DapStoreMode {
Local(LocalDapStore), Local(LocalDapStore),
Ssh(SshDapStore), Ssh(SshDapStore),

View file

@ -3415,7 +3415,6 @@ pub struct RemoteLspStore {
upstream_project_id: u64, upstream_project_id: u64,
} }
#[allow(clippy::large_enum_variant)]
pub(crate) enum LspStoreMode { pub(crate) enum LspStoreMode {
Local(LocalLspStore), // ssh host and collab host Local(LocalLspStore), // ssh host and collab host
Remote(RemoteLspStore), // collab guest Remote(RemoteLspStore), // collab guest
@ -8806,9 +8805,10 @@ impl LspStore {
}) })
}); });
let is_unnecessary = diagnostic.tags.as_ref().map_or(false, |tags| { let is_unnecessary = diagnostic
tags.iter().any(|tag| *tag == DiagnosticTag::UNNECESSARY) .tags
}); .as_ref()
.map_or(false, |tags| tags.contains(&DiagnosticTag::UNNECESSARY));
if is_supporting { if is_supporting {
supporting_diagnostics.insert( supporting_diagnostics.insert(

View file

@ -98,7 +98,7 @@ impl<Label: Ord + Clone> RootPathTrie<Label> {
}; };
} }
if !current.labels.is_empty() { if !current.labels.is_empty() {
(callback)(&current.worktree_relative_path, &current.labels); let _ = (callback)(&current.worktree_relative_path, &current.labels);
} }
} }

View file

@ -3653,7 +3653,7 @@ impl Project {
let mut buffer_count = 0; let mut buffer_count = 0;
let mut limit_reached = false; let mut limit_reached = false;
let query = Arc::new(query); let query = Arc::new(query);
let mut chunks = matching_buffers_rx.ready_chunks(64); let chunks = matching_buffers_rx.ready_chunks(64);
// Now that we know what paths match the query, we will load at most // Now that we know what paths match the query, we will load at most
// 64 buffers at a time to avoid overwhelming the main thread. For each // 64 buffers at a time to avoid overwhelming the main thread. For each
@ -4392,7 +4392,7 @@ impl Project {
envelope: TypedEnvelope<proto::LanguageServerPromptRequest>, envelope: TypedEnvelope<proto::LanguageServerPromptRequest>,
mut cx: AsyncApp, mut cx: AsyncApp,
) -> Result<proto::LanguageServerPromptResponse> { ) -> Result<proto::LanguageServerPromptResponse> {
let (tx, mut rx) = smol::channel::bounded(1); let (tx, rx) = smol::channel::bounded(1);
let actions: Vec<_> = envelope let actions: Vec<_> = envelope
.payload .payload
.actions .actions

View file

@ -21,7 +21,7 @@ use crate::{
worktree_store::WorktreeStore, worktree_store::WorktreeStore,
}; };
#[allow(clippy::large_enum_variant)] // platform-dependent warning // platform-dependent warning
pub enum TaskStore { pub enum TaskStore {
Functional(StoreState), Functional(StoreState),
Noop, Noop,

View file

@ -24,7 +24,7 @@ pub struct Terminals {
} }
/// Terminals are opened either for the users shell, or to run a task. /// Terminals are opened either for the users shell, or to run a task.
#[allow(clippy::large_enum_variant)]
#[derive(Debug)] #[derive(Debug)]
pub enum TerminalKind { pub enum TerminalKind {
/// Run a shell at the given path (or $HOME if None) /// Run a shell at the given path (or $HOME if None)

View file

@ -876,7 +876,7 @@ impl WorktreeStore {
async fn filter_paths( async fn filter_paths(
fs: &Arc<dyn Fs>, fs: &Arc<dyn Fs>,
mut input: Receiver<MatchingEntry>, input: Receiver<MatchingEntry>,
query: &SearchQuery, query: &SearchQuery,
) -> Result<()> { ) -> Result<()> {
let mut input = pin!(input); let mut input = pin!(input);

View file

@ -2854,12 +2854,9 @@ impl ProjectPanel {
} }
let precedes_new_entry = if let Some(new_entry_id) = new_entry_parent_id { let precedes_new_entry = if let Some(new_entry_id) = new_entry_parent_id {
entry.id == new_entry_id || { entry.id == new_entry_id || {
self.ancestors.get(&entry.id).map_or(false, |entries| { self.ancestors
entries .get(&entry.id)
.ancestors .map_or(false, |entries| entries.ancestors.contains(&new_entry_id))
.iter()
.any(|entry_id| *entry_id == new_entry_id)
})
} }
} else { } else {
false false
@ -3369,10 +3366,7 @@ impl ProjectPanel {
.ancestors .ancestors
.get(&entry.id) .get(&entry.id)
.is_some_and(|auto_folded_dirs| { .is_some_and(|auto_folded_dirs| {
auto_folded_dirs auto_folded_dirs.ancestors.contains(&edit_state.entry_id)
.ancestors
.iter()
.any(|entry_id| *entry_id == edit_state.entry_id)
}) })
}; };

View file

@ -925,7 +925,7 @@ impl SshRemoteClient {
if missed_heartbeats != 0 { if missed_heartbeats != 0 {
missed_heartbeats = 0; missed_heartbeats = 0;
this.update(cx, |this, mut cx| { let _ =this.update(cx, |this, mut cx| {
this.handle_heartbeat_result(missed_heartbeats, &mut cx) this.handle_heartbeat_result(missed_heartbeats, &mut cx)
})?; })?;
} }

View file

@ -170,7 +170,6 @@ pub fn run(
anyhow::Ok(()) anyhow::Ok(())
} }
#[allow(clippy::large_enum_variant)]
pub enum SessionSupport { pub enum SessionSupport {
ActiveSession(Entity<Session>), ActiveSession(Entity<Session>),
Inactive(KernelSpecification), Inactive(KernelSpecification),

View file

@ -20,7 +20,6 @@ pub struct MessageStream<S> {
encoding_buffer: Vec<u8>, encoding_buffer: Vec<u8>,
} }
#[allow(clippy::large_enum_variant)]
#[derive(Debug)] #[derive(Debug)]
pub enum Message { pub enum Message {
Envelope(Envelope), Envelope(Envelope),

View file

@ -186,7 +186,6 @@ impl From<AttachRequest> for DebugRequest {
#[derive(Deserialize, Serialize, PartialEq, Eq, JsonSchema, Clone, Debug)] #[derive(Deserialize, Serialize, PartialEq, Eq, JsonSchema, Clone, Debug)]
#[serde(untagged)] #[serde(untagged)]
#[allow(clippy::large_enum_variant)]
pub enum BuildTaskDefinition { pub enum BuildTaskDefinition {
ByName(SharedString), ByName(SharedString),
Template { Template {

View file

@ -1,5 +1,5 @@
[toolchain] [toolchain]
channel = "1.86" channel = "1.87"
profile = "minimal" profile = "minimal"
components = [ "rustfmt", "clippy" ] components = [ "rustfmt", "clippy" ]
targets = [ targets = [