Skip to content

Commit

Permalink
Auto merge of #127486 - matthiaskrgr:rollup-lvv018b, r=matthiaskrgr
Browse files Browse the repository at this point in the history
Rollup of 5 pull requests

Successful merges:

 - #120248 (Make casts of pointers to trait objects stricter)
 - #127355 (Mark format! with must_use hint)
 - #127399 (Verify that allocations output by GVN are sufficiently aligned.)
 - #127460 (clarify `sys::unix::fd::FileDesc::drop` comment)
 - #127467 (bootstrap: once_cell::sync::Lazy -> std::sync::LazyLock)

Failed merges:

 - #127357 (Remove `StructuredDiag`)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jul 8, 2024
2 parents f1644e5 + fa5f02d commit 738cc0f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/pass/intptrcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn cast_dangling() {
fn format() {
// Pointer string formatting! We can't check the output as it changes when libstd changes,
// but we can make sure Miri does not error.
format!("{:?}", &mut 13 as *mut _);
let _ = format!("{:?}", &mut 13 as *mut _);
}

fn transmute() {
Expand All @@ -52,7 +52,7 @@ fn ptr_bitops1() {
let one = bytes.as_ptr().wrapping_offset(1);
let three = bytes.as_ptr().wrapping_offset(3);
let res = (one as usize) | (three as usize);
format!("{}", res);
let _ = format!("{}", res);
}

fn ptr_bitops2() {
Expand Down
2 changes: 1 addition & 1 deletion tests/pass/packed_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fn test_derive() {
assert_eq!(x.partial_cmp(&y).unwrap(), x.cmp(&y));
x.hash(&mut DefaultHasher::new());
P::default();
format!("{:?}", x);
let _ = format!("{:?}", x);
}

fn main() {
Expand Down
4 changes: 2 additions & 2 deletions tests/pass/shims/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ fn test_errors() {
// Opening a non-existing file should fail with a "not found" error.
assert_eq!(ErrorKind::NotFound, File::open(&path).unwrap_err().kind());
// Make sure we can also format this.
format!("{0}: {0:?}", File::open(&path).unwrap_err());
let _ = format!("{0}: {0:?}", File::open(&path).unwrap_err());
// Removing a non-existing file should fail with a "not found" error.
assert_eq!(ErrorKind::NotFound, remove_file(&path).unwrap_err().kind());
// Reading the metadata of a non-existing file should fail with a "not found" error.
Expand Down Expand Up @@ -301,5 +301,5 @@ fn test_from_raw_os_error() {
let error = Error::from_raw_os_error(code);
assert!(matches!(error.kind(), ErrorKind::Uncategorized));
// Make sure we can also format this.
format!("{error:?}");
let _ = format!("{error:?}");
}
2 changes: 1 addition & 1 deletion tests/pass/shims/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ fn main() {
panic!("unsupported OS")
};
let err = io::Error::from_raw_os_error(raw_os_error);
format!("{err}: {err:?}");
let _ = format!("{err}: {err:?}");
}
4 changes: 2 additions & 2 deletions tests/pass/vecdeque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ fn main() {
}

// Regression test for Debug impl's
format!("{:?} {:?}", dst, dst.iter());
format!("{:?}", VecDeque::<u32>::new().iter());
let _ = format!("{:?} {:?}", dst, dst.iter());
let _ = format!("{:?}", VecDeque::<u32>::new().iter());

for a in dst {
assert_eq!(*a, 2);
Expand Down

0 comments on commit 738cc0f

Please sign in to comment.