diff --git a/tests/compile-fail-fullmir/stacked_borrows/alias_through_mutation.rs b/tests/compile-fail-fullmir/stacked_borrows/alias_through_mutation.rs index 092f3f09ed1..db9ac93279f 100644 --- a/tests/compile-fail-fullmir/stacked_borrows/alias_through_mutation.rs +++ b/tests/compile-fail-fullmir/stacked_borrows/alias_through_mutation.rs @@ -1,5 +1,3 @@ -#![allow(unused_variables)] - // This makes a ref that was passed to us via &mut alias with things it should not alias with fn retarget(x: &mut &u32, target: &mut u32) { unsafe { *x = &mut *(target as *mut _); } diff --git a/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut1.rs b/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut1.rs index b82901985b7..9bced43f6e8 100644 --- a/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut1.rs +++ b/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut1.rs @@ -1,8 +1,6 @@ -#![allow(unused_variables)] - use std::mem; -pub fn safe(x: &mut i32, y: &mut i32) {} //~ ERROR barrier +pub fn safe(_x: &mut i32, _y: &mut i32) {} //~ ERROR barrier fn main() { let mut x = 0; diff --git a/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut2.rs b/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut2.rs index 69caddfa8c3..ea24f1bd274 100644 --- a/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut2.rs +++ b/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut2.rs @@ -1,8 +1,6 @@ -#![allow(unused_variables)] - use std::mem; -pub fn safe(x: &i32, y: &mut i32) {} //~ ERROR barrier +pub fn safe(_x: &i32, _y: &mut i32) {} //~ ERROR barrier fn main() { let mut x = 0; diff --git a/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut3.rs b/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut3.rs index d37f9e63f60..e564e878ddb 100644 --- a/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut3.rs +++ b/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut3.rs @@ -1,8 +1,6 @@ -#![allow(unused_variables)] - use std::mem; -pub fn safe(x: &mut i32, y: &i32) {} //~ ERROR does not exist on the stack +pub fn safe(_x: &mut i32, _y: &i32) {} //~ ERROR does not exist on the stack fn main() { let mut x = 0; diff --git a/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut4.rs b/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut4.rs index bf65d6e2303..15f67d0f872 100644 --- a/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut4.rs +++ b/tests/compile-fail-fullmir/stacked_borrows/aliasing_mut4.rs @@ -1,10 +1,8 @@ -#![allow(unused_variables)] - use std::mem; use std::cell::Cell; // Make sure &mut UnsafeCell also is exclusive -pub fn safe(x: &i32, y: &mut Cell) {} //~ ERROR barrier +pub fn safe(_x: &i32, _y: &mut Cell) {} //~ ERROR barrier fn main() { let mut x = 0; diff --git a/tests/compile-fail-fullmir/stacked_borrows/buggy_split_at_mut.rs b/tests/compile-fail-fullmir/stacked_borrows/buggy_split_at_mut.rs index a6daa5d93d7..959c6314690 100644 --- a/tests/compile-fail-fullmir/stacked_borrows/buggy_split_at_mut.rs +++ b/tests/compile-fail-fullmir/stacked_borrows/buggy_split_at_mut.rs @@ -1,5 +1,3 @@ -#![allow(unused_variables)] - mod safe { use std::slice::from_raw_parts_mut; diff --git a/tests/compile-fail-fullmir/stacked_borrows/illegal_write2.rs b/tests/compile-fail-fullmir/stacked_borrows/illegal_write2.rs index f4fefaad5e2..ba3b6686b84 100644 --- a/tests/compile-fail-fullmir/stacked_borrows/illegal_write2.rs +++ b/tests/compile-fail-fullmir/stacked_borrows/illegal_write2.rs @@ -1,5 +1,3 @@ -#![allow(unused_variables)] - fn main() { let target = &mut 42; let target2 = target as *mut _; diff --git a/tests/compile-fail/never_transmute_humans.rs b/tests/compile-fail/never_transmute_humans.rs index 169e861be0b..34203338696 100644 --- a/tests/compile-fail/never_transmute_humans.rs +++ b/tests/compile-fail/never_transmute_humans.rs @@ -2,17 +2,12 @@ // compile-flags: -Zmiri-disable-validation #![feature(never_type)] -#![allow(unreachable_code)] -#![allow(unused_variables)] struct Human; fn main() { - let x: ! = unsafe { + let _x: ! = unsafe { std::mem::transmute::(Human) //~ ERROR constant evaluation error //^~ NOTE entered unreachable code }; - f(x) } - -fn f(x: !) -> ! { x } diff --git a/tests/compile-fail/never_transmute_void.rs b/tests/compile-fail/never_transmute_void.rs index 9c0165fed22..fab4981047f 100644 --- a/tests/compile-fail/never_transmute_void.rs +++ b/tests/compile-fail/never_transmute_void.rs @@ -2,8 +2,6 @@ // compile-flags: -Zmiri-disable-validation #![feature(never_type)] -#![allow(unreachable_code)] -#![allow(unused_variables)] enum Void {} diff --git a/tests/compile-fail/validity/transmute_through_ptr.rs b/tests/compile-fail/validity/transmute_through_ptr.rs index d6bc0305e69..4b6a3c95928 100644 --- a/tests/compile-fail/validity/transmute_through_ptr.rs +++ b/tests/compile-fail/validity/transmute_through_ptr.rs @@ -1,5 +1,3 @@ -#![allow(unused_variables)] - #[repr(u32)] enum Bool { True } diff --git a/tests/run-pass/dst-struct.rs b/tests/run-pass/dst-struct.rs index 6ef0a6330f7..4c9e598e6ba 100644 --- a/tests/run-pass/dst-struct.rs +++ b/tests/run-pass/dst-struct.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![allow(unused_features)] #![feature(box_syntax)] struct Fat { diff --git a/tests/run-pass/issue-31267-additional.rs b/tests/run-pass/issue-31267-additional.rs index 14e38f43c52..aaeeef8bf98 100644 --- a/tests/run-pass/issue-31267-additional.rs +++ b/tests/run-pass/issue-31267-additional.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(unused_variables)] - #[derive(Clone, Copy, Debug)] struct Bar; @@ -25,5 +23,5 @@ impl Biz { } fn main() { - let foo = Biz::BAZ; + let _foo = Biz::BAZ; } diff --git a/tests/run-pass/many_shr_bor.rs b/tests/run-pass/many_shr_bor.rs index 393bafebfe4..d4901abb808 100644 --- a/tests/run-pass/many_shr_bor.rs +++ b/tests/run-pass/many_shr_bor.rs @@ -1,5 +1,4 @@ // Make sure validation can handle many overlapping shared borrows for different parts of a data structure -#![allow(unused_variables)] use std::cell::RefCell; struct Test { @@ -25,9 +24,9 @@ fn test2(r: &mut RefCell) { let x = &*r; // releasing write lock, first suspension recorded let mut x_ref = x.borrow_mut(); let x_inner : &mut i32 = &mut *x_ref; // new inner write lock, with same lifetime as outer lock - let x_inner_shr = &*x_inner; // releasing inner write lock, recording suspension - let y = &*r; // second suspension for the outer write lock - let x_inner_shr2 = &*x_inner; // 2nd suspension for inner write lock + let _x_inner_shr = &*x_inner; // releasing inner write lock, recording suspension + let _y = &*r; // second suspension for the outer write lock + let _x_inner_shr2 = &*x_inner; // 2nd suspension for inner write lock } fn main() { diff --git a/tests/run-pass/move-arg-2-unique.rs b/tests/run-pass/move-arg-2-unique.rs index d44c83763b7..77f763888ea 100644 --- a/tests/run-pass/move-arg-2-unique.rs +++ b/tests/run-pass/move-arg-2-unique.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(unused_features, unused_variables)] #![feature(box_syntax)] fn test(foo: Box> ) { assert_eq!((*foo)[0], 10); } diff --git a/tests/run-pass/move-arg-3-unique.rs b/tests/run-pass/move-arg-3-unique.rs index 2e6320eb802..0754a3f60d3 100644 --- a/tests/run-pass/move-arg-3-unique.rs +++ b/tests/run-pass/move-arg-3-unique.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![allow(unused_features, unused_variables)] #![feature(box_syntax)] pub fn main() { diff --git a/tests/run-pass/regions-lifetime-nonfree-late-bound.rs b/tests/run-pass/regions-lifetime-nonfree-late-bound.rs index 96f1217a254..dfdf89c9c1c 100644 --- a/tests/run-pass/regions-lifetime-nonfree-late-bound.rs +++ b/tests/run-pass/regions-lifetime-nonfree-late-bound.rs @@ -22,7 +22,6 @@ // doing region-folding, when really all clients of the region-folding // case only want to see FREE lifetime variables, not bound ones. -#![allow(unused_features)] #![feature(box_syntax)] pub fn main() {