]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #1889 - hyd-dev:rustup, r=RalfJung
authorbors <bors@rust-lang.org>
Sat, 11 Sep 2021 15:47:22 +0000 (15:47 +0000)
committerbors <bors@rust-lang.org>
Sat, 11 Sep 2021 15:47:22 +0000 (15:47 +0000)
Add `#[allow(dead_code)]` in some tests

There are some new dead code warnings in the tests: https://github.com/rust-lang/miri/runs/3573853719?check_suite_focus=true#step:8:290
I guess this is related to https://github.com/rust-lang/rust/pull/85200, and add `#[allow(dead_code)]` to suppress them in this PR (I assume this is fine because https://github.com/rust-lang/rust/pull/85200 also suppresses warnings in rustc's tests).

rust-version
tests/compile-fail/validity/invalid_wide_raw.rs
tests/run-pass/issue-3794.rs

index c3b3aed9a426462ab7d6513eb480766c95fcb42b..26d88f5b07b5fe844ea2343147a0c7466d010a57 100644 (file)
@@ -1 +1 @@
-c5cbf7852a7692c7c51df64c09a59e7838b55202
+4e880f8cbc191374ce7db335962489f41d6d4e3e
index 6e0809b15ca43f4517a1e7b83db46692535e8b23..ac2d79b5a92ad56f91ba28a4c3708c8d07b58e77 100644 (file)
@@ -4,6 +4,7 @@ fn main() {
     trait T { }
     #[derive(Debug)]
     struct S {
+        #[allow(dead_code)]
         x: * mut dyn T
     }
     dbg!(S { x: unsafe { std::mem::transmute((0usize, 0usize)) } }); //~ ERROR: encountered dangling vtable pointer in wide pointer
index fb1c19b04e9984482ed6f34aa26c5057e9baabff..5b5b22b54948d43d8f00e254472f1393affb5bc5 100644 (file)
@@ -6,6 +6,7 @@ trait T {
 
 #[derive(Debug)]
 struct S {
+    #[allow(dead_code)]
     s: isize,
 }