From be71319aed7a101e22b14d2c35cbe405808860ba Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 5 Mar 2025 21:14:27 -0800 Subject: [PATCH] Update platform010 & platform010-aarch64 symlinks Summary: Release notes: - https://blog.rust-lang.org/2025/01/09/Rust-1.84.0.html - https://blog.rust-lang.org/2025/01/30/Rust-1.84.1.html Relevant changes: - `--target wasm32-wasi` renamed to `--target wasm32-wasip1` - `temporary_cstring_as_ptr` lint renamed and extended as `dangling_pointers_from_temporaries` to cover Vec and other types - `feature(exposed_provenance)` stabilized - `feature(pin_deref_mut)` stabilized - `feature(strict_provenance)` stabilized - `fuzzy_provenance_casts` lint is now behind `feature(strict_provenance_lints)` - inherent methods for locking on `std::fs::File` collide with `fs2::FileExt` - [`.lock_exclusive()`](https://docs.rs/fs2/0.4.3/fs2/trait.FileExt.html#tymethod.lock_exclusive) -> [`.lock()`](https://doc.rust-lang.org/1.84.1/std/fs/struct.File.html#method.lock) - [`.lock_shared()`](https://docs.rs/fs2/0.4.3/fs2/trait.FileExt.html#tymethod.lock_shared) -> [`.lock_shared()`](https://doc.rust-lang.org/1.84.1/std/fs/struct.File.html#method.lock_shared) - [`.try_lock_exclusive()`](https://docs.rs/fs2/0.4.3/fs2/trait.FileExt.html#tymethod.try_lock_exclusive) -> `fs2::FileExt::try_lock_exclusive` - [`.try_lock_shared()`](https://docs.rs/fs2/0.4.3/fs2/trait.FileExt.html#tymethod.try_lock_shared) -> `fs2::FileExt::try_lock_shared` - the fs2 try-locking methods have different signature and semantics than File's [`try_lock()`](https://doc.rust-lang.org/1.84.1/std/fs/struct.File.html#method.try_lock) and [`try_lock_shared()`](https://doc.rust-lang.org/1.84.1/std/fs/struct.File.html#method.try_lock_shared); we will want to refactor to use the new standard methods, but this will entail more care than belongs in this diff - expanded `unused_must_use` lint - expanded `unused_parens` lint - (leftover from 1.82) `std::panic::PanicInfo` deprecated in favor of `PanicHookInfo` - forward-compatibility lints regarding never-type fallback - new clippy lints: - `clippy::extra_unused_lifetimes` - `clippy::needless_as_bytes` - `clippy::unnecessary_map_or` Differential Revision: D70601924 fbshipit-source-id: 10f89f92ad44564802b12e7f092e2719ba2fcd98 --- HACKING.md | 4 ++-- app/buck2_execute/src/re/client.rs | 3 ++- app/buck2_futures/src/lib.rs | 1 - docs/about/getting_started.md | 4 ++-- lint_levels.bzl | 3 +++ rust-toolchain | 4 ++-- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/HACKING.md b/HACKING.md index fed30b2c2e424..38a08fbf850df 100644 --- a/HACKING.md +++ b/HACKING.md @@ -22,8 +22,8 @@ cargo install --path=app/buck2 Or, alternatively, install it directly from GitHub: ```sh -rustup install nightly-2024-10-13 -cargo +nightly-2024-10-13 install --git https://github.com/facebook/buck2.git buck2 +rustup install nightly-2024-11-22 +cargo +nightly-2024-11-22 install --git https://github.com/facebook/buck2.git buck2 ``` ### Side note: using [Nix] to compile the source diff --git a/app/buck2_execute/src/re/client.rs b/app/buck2_execute/src/re/client.rs index 720390d64a7cd..62c22f33c72b7 100644 --- a/app/buck2_execute/src/re/client.rs +++ b/app/buck2_execute/src/re/client.rs @@ -1485,7 +1485,8 @@ mod tests { let v = vec![1, 2, 3]; let addr = v.as_ptr() as usize; let mut it = chunks(v, 3); - assert_eq!(it.next().unwrap().as_ptr() as usize, addr); + let first = it.next().unwrap(); + assert_eq!(first.as_ptr() as usize, addr); assert_eq!(it.next(), None); } diff --git a/app/buck2_futures/src/lib.rs b/app/buck2_futures/src/lib.rs index cfaa394bdf915..d863748ea174e 100644 --- a/app/buck2_futures/src/lib.rs +++ b/app/buck2_futures/src/lib.rs @@ -8,7 +8,6 @@ */ #![feature(assert_matches)] -#![feature(pin_deref_mut)] pub mod cancellation; mod details; diff --git a/docs/about/getting_started.md b/docs/about/getting_started.md index e24ba1abd10f5..644b784d3ebdd 100644 --- a/docs/about/getting_started.md +++ b/docs/about/getting_started.md @@ -20,8 +20,8 @@ To get started, first install [rustup](https://rustup.rs/), then compile the `buck2` executable: ```bash -rustup install nightly-2024-10-13 -cargo +nightly-2024-10-13 install --git https://github.com/facebook/buck2.git buck2 +rustup install nightly-2024-11-22 +cargo +nightly-2024-11-22 install --git https://github.com/facebook/buck2.git buck2 ``` The above commands install `buck2` into a suitable directory, such as diff --git a/lint_levels.bzl b/lint_levels.bzl index 2437f87a83cf7..ccd94d8c9b0b9 100644 --- a/lint_levels.bzl +++ b/lint_levels.bzl @@ -21,6 +21,7 @@ CLIPPY_ALLOW = [ "clippy::derive_partial_eq_without_eq", # In generated protobuf code "clippy::disallowed_names", # Not using foo, bar, baz in test data is silly "clippy::enum_variant_names", # Sometimes you do want the same prefixes + "clippy::extra_unused_lifetimes", # FIXME new in Rust 1.84 "clippy::from_iter_instead_of_collect", # https://fb.workplace.com/groups/buck2core/posts/835300915330313 "clippy::implicit_hasher", # Makes code more complex for little benefit "clippy::len_without_is_empty", # len() == 0 is perfectly clear @@ -34,6 +35,7 @@ CLIPPY_ALLOW = [ "clippy::mut_from_ref", # Tries to check soundness, which Rust already does "clippy::mutable_key_type", # FIXME new in Rust 1.80 "clippy::naive_bytecount", # Requires an extra dependency for marginal gains. + "clippy::needless_as_bytes", # FIXME new in Rust 1.84 "clippy::needless_borrows_for_generic_args", # FIXME new in Rust 1.74 "clippy::needless_collect", # False positives: doesn't understand lifetimes, or e.g. DoubleEndedIterator. "clippy::needless_lifetimes", # This is throwing false positives @@ -48,6 +50,7 @@ CLIPPY_ALLOW = [ "clippy::too_many_arguments", # This is an arbitrary limit set on number of arguments and not always useful "clippy::type_complexity", # This is an arbitrary limit set on number of type parameterizations and not always useful "clippy::unconditional_recursion", # FIXME new in Rust 1.77.1 + "clippy::unnecessary_map_or", # FIXME new in Rust 1.84 "clippy::unnecessary_wraps", # Sometimes unnecessary wraps provide the right API "clippy::unwrap_or_default", # Defaults aren't always more clear as it removes the type information when reading code "clippy::useless_conversion", # Removed all obvious but there are some reports I'm unclear how to fix diff --git a/rust-toolchain b/rust-toolchain index 96935d247bff5..346c6e3596bd2 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -10,6 +10,6 @@ # * NOTE: You may have to change this ocaml file in a follow up commit as ocamlrep # has a dependency on buck2 git trunk. -# @rustc_version: rustc 1.83.0-nightly (6b9676b45 2024-10-12) -channel = "nightly-2024-10-13" +# @rustc_version: rustc 1.84.0-nightly (b19329a37 2024-11-21) +channel = "nightly-2024-11-22" components = ["llvm-tools-preview","rustc-dev","rust-src"]