Skip to content

Commit f0a47e3

Browse files
diliopfacebook-github-bot
authored andcommitted
Update platform010 & platform010-aarch64 symlinks
Summary: Upgrading Rust from `1.80.1` to `1.81.0` ([release notes](https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html)) with the following changes affecting `fbsource`: * Feature stabilizations: * `io_slice_advance` ([#62726](rust-lang/rust#62726)) * `panic_info_message` ([#66745](rust-lang/rust#66745)) * `fs_try_exists` ([#83186](rust-lang/rust#83186)) * `lint_reasons` ([#120924](rust-lang/rust#120924)) * `duration_abs_diff` ([#117618](rust-lang/rust#117618)) * `effects` ([#102090](rust-lang/rust#102090)) * New `clippy` lints: * `manual_inspect` ([#12287](rust-lang/rust-clippy#12287)) * `manual_pattern_char_comparison` ([#12849](rust-lang/rust-clippy#12849)) * Other: * `NEVER_TYPE_FALLBACK_FLOWING_INTO_UNSAFE` became a deny-by-default lint ([#126881](rust-lang/rust#126881) & [#123748](rust-lang/rust#123748)) * Changes to `stringify!` introducing whitespaces between some tokens ([#125174](rust-lang/rust#125174)) * `format!` is now marked with a `must_use` hint ([#127355](rust-lang/rust#127355)) ignore-conflict-markers Reviewed By: zertosh, dtolnay Differential Revision: D63864870 fbshipit-source-id: c8d61f3e9483ec709c8116514cfb030c883ec262
1 parent f459c08 commit f0a47e3

File tree

21 files changed

+35
-42
lines changed

21 files changed

+35
-42
lines changed

HACKING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ cargo install --path=app/buck2
2222
Or, alternatively, install it directly from GitHub:
2323

2424
```sh
25-
rustup install nightly-2024-06-08
26-
cargo +nightly-2024-06-08 install --git https://github.com/facebook/buck2.git buck2
25+
rustup install nightly-2024-07-21
26+
cargo +nightly-2024-07-21 install --git https://github.com/facebook/buck2.git buck2
2727
```
2828

2929
### Side note: using [Nix] to compile the source

allocative/allocative/src/rc_str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use std::ops::Deref;
1414
use std::rc::Rc;
1515

1616
#[derive(Clone, Debug, PartialEq, Eq, Ord, PartialOrd)]
17+
#[allow(dead_code)]
1718
pub(crate) struct RcStr(Rc<str>);
1819

1920
impl<'a> From<&'a str> for RcStr {

app/buck2_build_api/src/actions/query.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,14 +417,12 @@ pub fn iter_action_inputs<'a>(
417417
type Item = &'a SetProjectionInputs;
418418

419419
fn next(&mut self) -> Option<Self::Item> {
420-
self.queue.pop_front().map(|node| {
420+
self.queue.pop_front().inspect(|node| {
421421
for child in &*node.node.children {
422422
if self.visited.insert(child) {
423423
self.queue.push_back(child);
424424
}
425425
}
426-
427-
node
428426
})
429427
}
430428
}

app/buck2_common/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
//! Common core components of buck2
1313
14-
#![feature(fs_try_exists)]
1514
#![feature(io_error_more)]
1615
#![feature(is_sorted)]
1716
#![feature(map_try_insert)]

app/buck2_common/src/temp_path.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ mod tests {
7575
let temp_path = TempPath::new().unwrap();
7676
let path = temp_path.path().to_path_buf();
7777

78-
assert!(!fs::try_exists(&path).unwrap());
78+
assert!(!path.try_exists().unwrap());
7979

8080
fs::write(&path, "hello").unwrap();
8181

82-
assert!(fs::try_exists(&path).unwrap(), "Sanity check");
82+
assert!(path.try_exists().unwrap(), "Sanity check");
8383

8484
temp_path.close().unwrap();
8585

86-
assert!(!fs::try_exists(&path).unwrap());
86+
assert!(!path.try_exists().unwrap());
8787
}
8888
}

app/buck2_core/src/env/registry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct EnvInfoEntry {
3030

3131
impl EnvInfoEntry {
3232
pub fn ty_short(&self) -> &'static str {
33-
self.ty.rfind(':').map_or(self.ty, |i| &self.ty[i + 1..])
33+
self.ty.rfind(':').map_or(self.ty, |i| &self.ty[i + 2..])
3434
}
3535
}
3636

@@ -53,7 +53,7 @@ mod tests {
5353
assert_eq!(
5454
&EnvInfoEntry {
5555
name: "TEST_VAR_1",
56-
ty: "std::string::String",
56+
ty: "std :: string :: String",
5757
default: None,
5858
applicability: Applicability::Internal,
5959
},

app/buck2_core/src/fs/fs_util.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ pub fn read_dir_if_exists<P: AsRef<AbsNormPath>>(path: P) -> Result<Option<ReadD
318318
pub fn try_exists<P: AsRef<AbsPath>>(path: P) -> Result<bool, IoError> {
319319
let _guard = IoCounterKey::Stat.guard();
320320
make_error!(
321-
fs::try_exists(path.as_ref().as_maybe_relativized()),
321+
path.as_ref().as_maybe_relativized().try_exists(),
322322
format!("try_exists({})", P::as_ref(&path).display())
323323
)
324324
}
@@ -1060,7 +1060,7 @@ mod tests {
10601060
let dir_path = root.join("dir");
10611061
create_dir_all(AbsPath::new(&dir_path)?)?;
10621062
assert_matches!(remove_file(&dir_path), Err(..));
1063-
assert!(fs::try_exists(&dir_path)?);
1063+
assert!(dir_path.try_exists()?);
10641064
Ok(())
10651065
}
10661066

@@ -1102,7 +1102,7 @@ mod tests {
11021102
let path = root.join("file");
11031103
fs::write(&path, b"regular")?;
11041104
remove_all(&path)?;
1105-
assert!(!fs::try_exists(&path)?);
1105+
assert!(!path.try_exists()?);
11061106
Ok(())
11071107
}
11081108

@@ -1114,7 +1114,7 @@ mod tests {
11141114
fs::create_dir(&path)?;
11151115
fs::write(path.join("file"), b"regular file in a dir")?;
11161116
remove_all(&path)?;
1117-
assert!(!fs::try_exists(&path)?);
1117+
assert!(!path.try_exists()?);
11181118
Ok(())
11191119
}
11201120

@@ -1163,7 +1163,7 @@ mod tests {
11631163
let file_path = root.join("file");
11641164
fs::write(&file_path, b"File content")?;
11651165
assert!(remove_dir_all(&file_path).is_err());
1166-
assert!(fs::try_exists(&file_path)?);
1166+
assert!(file_path.try_exists()?);
11671167
Ok(())
11681168
}
11691169

app/buck2_core/src/fs/paths/abs_norm_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ fn verify_abs_path_windows_part(path: &str) -> bool {
853853
// TODO(nga): behavior of UNC paths is under-specified in `AbsPath`.
854854
let path = path.strip_prefix("\\\\.\\").unwrap_or(path);
855855

856-
for component in path.split(|c| c == '/' || c == '\\') {
856+
for component in path.split(['/', '\\']) {
857857
if component == "." || component == ".." {
858858
return false;
859859
}

app/buck2_core/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#![feature(error_generic_member_access)]
1111
#![feature(decl_macro)]
12-
#![feature(fs_try_exists)]
1312
#![feature(never_type)]
1413
#![feature(pattern)]
1514
#![feature(box_patterns)]

app/buck2_daemon/src/daemonize.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ type Errno = libc::c_int;
200200

201201
/// This error type for `Daemonize` `start` method.
202202
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Dupe)]
203+
#[allow(dead_code)]
203204
struct Error {
204205
kind: ErrorKind,
205206
}

0 commit comments

Comments
 (0)