Add #[allow(dead_code)] in some tests

This commit is contained in:
hyd-dev 2021-09-11 18:58:57 +08:00
parent 0359331869
commit 9a877b80fe
No known key found for this signature in database
GPG Key ID: 74FA7FD5B8DA14B8
3 changed files with 3 additions and 1 deletions

View File

@ -1 +1 @@
c5cbf7852a7692c7c51df64c09a59e7838b55202
4e880f8cbc191374ce7db335962489f41d6d4e3e

View 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

View File

@ -6,6 +6,7 @@ trait T {
#[derive(Debug)]
struct S {
#[allow(dead_code)]
s: isize,
}