]> git.lizzy.rs Git - rust.git/commitdiff
fix warnings
authorRalf Jung <post@ralfj.de>
Sat, 24 Dec 2022 09:12:28 +0000 (10:12 +0100)
committerRalf Jung <post@ralfj.de>
Sat, 24 Dec 2022 09:40:50 +0000 (10:40 +0100)
src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr
src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr
src/tools/miri/tests/pass/vec.rs

index bd51a6645a676ed181a6afc66edc5d9ca3ce69f3..3d0cef241c3e619207799e2c8f6bea8924cd1ace 100644 (file)
@@ -16,7 +16,7 @@ help: <TAG> is this argument
    |
 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 `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
index 3f9e6708bdaade56cb6e7d19038a240eaca42718..7f2917e7950535e45e0a7d5ba4bf3c2dcba8658e 100644 (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);
    |                 ^^^^^^^^^^^^^^^^^^^^^^
-   = 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 `main`
   --> $DIR/drop_in_place_retag.rs:LL:CC
index fb1d8e306f293acd0eba42a2b31ddb09eda476bb..3a6655e2ba69f5bfa5daa1394721b3011cfac622 100644 (file)
@@ -48,7 +48,7 @@ fn vec_into_iter_zst() {
     assert_eq!(v, 0);
 
     let mut it = vec![[0u64; 0], [0u64; 0]].into_iter();
-    it.advance_by(1);
+    it.advance_by(1).unwrap();
     drop(it);
 
     let mut it = vec![[0u64; 0], [0u64; 0]].into_iter();