Skip to content

upgrade to Rust v1.46.0 #10694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.45.2
1.46.0
2 changes: 1 addition & 1 deletion src/rust/engine/fs/brfs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#![allow(clippy::new_without_default, clippy::new_ret_no_self)]
// Arc<Mutex> can be more clear than needing to grok Orderings:
#![allow(clippy::mutex_atomic)]
#![type_length_limit = "1303944"]
#![type_length_limit = "44109434"]

use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::collections::HashMap;
Expand Down
1 change: 1 addition & 0 deletions src/rust/engine/fs/src/glob_matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ trait GlobMatchingImplementation<E: Display + Send + Sync + 'static>: VFS<E> {
.into_inner()
.into_iter()
.collect::<Vec<_>>();
#[allow(clippy::unnecessary_sort_by)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the deal with these? Is there a bug for false positives we can link to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing that I see in the Clippy issues tracker. I am opening an issue there now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path_stats.sort_by(|a, b| a.path().cmp(b.path()));
path_stats.dedup_by(|a, b| a.path() == b.path());
Ok(path_stats)
Expand Down
1 change: 1 addition & 0 deletions src/rust/engine/fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ impl PosixFS {
format!("Failed to scan directory {:?}: {}", dir_abs, e),
)
})?;
#[allow(clippy::unnecessary_sort_by)]
stats.sort_by(|s1, s2| s1.path().cmp(s2.path()));
Ok(DirectoryListing(stats))
}
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/fs/store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#![allow(clippy::new_without_default, clippy::new_ret_no_self)]
// Arc<Mutex> can be more clear than needing to grok Orderings:
#![allow(clippy::mutex_atomic)]
#![type_length_limit = "8576838"]
#![type_length_limit = "95595489"]

mod snapshot;
pub use crate::snapshot::{OneOffStoreFileByDigest, Snapshot, StoreFileByDigest};
Expand Down
3 changes: 3 additions & 0 deletions src/rust/engine/fs/store/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ impl Snapshot {
file_digester: S,
mut path_stats: Vec<PathStat>,
) -> Result<Snapshot, String> {
#[allow(clippy::unnecessary_sort_by)]
path_stats.sort_by(|a, b| a.path().cmp(b.path()));

// The helper assumes that if a Path has multiple children, it must be a directory.
Expand Down Expand Up @@ -87,6 +88,7 @@ impl Snapshot {
let mut path_stats =
Iterator::flatten(path_stats_per_directory.into_iter().map(Vec::into_iter))
.collect::<Vec<_>>();
#[allow(clippy::unnecessary_sort_by)]
path_stats.sort_by(|l, r| l.path().cmp(&r.path()));
Ok(Snapshot { digest, path_stats })
}
Expand All @@ -100,6 +102,7 @@ impl Snapshot {
path_stats: &[PathStat],
) -> Result<Digest, String> {
let mut sorted_path_stats = path_stats.to_owned();
#[allow(clippy::unnecessary_sort_by)]
sorted_path_stats.sort_by(|a, b| a.path().cmp(b.path()));
Snapshot::ingest_directory_from_sorted_path_stats(store, file_digester, &sorted_path_stats)
.await
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/process_execution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#![allow(clippy::new_without_default, clippy::new_ret_no_self)]
// Arc<Mutex> can be more clear than needing to grok Orderings:
#![allow(clippy::mutex_atomic)]
#![type_length_limit = "35811178"]
#![type_length_limit = "43757804"]
#[macro_use]
extern crate derivative;

Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// just the one minor call as unsafe, than to mark the whole function as unsafe which may hide
// other unsafeness.
#![allow(clippy::not_unsafe_ptr_arg_deref)]
#![type_length_limit = "42187898"]
#![type_length_limit = "43757804"]

mod context;
mod core;
Expand Down