fix warnings

This commit is contained in:
Ralf Jung 2022-12-24 10:12:28 +01:00
parent 9c01e9f7f5
commit e52e0d8557
3 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
| |
LL | core::ptr::drop_in_place(x); LL | core::ptr::drop_in_place(x);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: BACKTRACE: = note: BACKTRACE (of the first span):
= note: inside `<HasDrop as std::ops::Drop>::drop` at $DIR/drop_in_place_protector.rs:LL:CC = note: inside `<HasDrop as std::ops::Drop>::drop` at $DIR/drop_in_place_protector.rs:LL:CC
= note: inside `std::ptr::drop_in_place::<HasDrop> - shim(Some(HasDrop))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::ptr::drop_in_place::<HasDrop> - shim(Some(HasDrop))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
= note: inside `std::ptr::drop_in_place::<(HasDrop, u8)> - shim(Some((HasDrop, u8)))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::ptr::drop_in_place::<(HasDrop, u8)> - shim(Some((HasDrop, u8)))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC

View File

@ -14,7 +14,7 @@ help: <TAG> was created by a SharedReadOnly retag at offsets [0x0..0x1]
| |
LL | let x = core::ptr::addr_of!(x); LL | let x = core::ptr::addr_of!(x);
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
= note: BACKTRACE: = note: BACKTRACE (of the first span):
= note: inside `std::ptr::drop_in_place::<u8> - shim(None)` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::ptr::drop_in_place::<u8> - shim(None)` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
note: inside `main` note: inside `main`
--> $DIR/drop_in_place_retag.rs:LL:CC --> $DIR/drop_in_place_retag.rs:LL:CC

View File

@ -48,7 +48,7 @@ fn vec_into_iter_zst() {
assert_eq!(v, 0); assert_eq!(v, 0);
let mut it = vec![[0u64; 0], [0u64; 0]].into_iter(); let mut it = vec![[0u64; 0], [0u64; 0]].into_iter();
it.advance_by(1); it.advance_by(1).unwrap();
drop(it); drop(it);
let mut it = vec![[0u64; 0], [0u64; 0]].into_iter(); let mut it = vec![[0u64; 0], [0u64; 0]].into_iter();