Skip to content

Commit 36a2b89

Browse files
committed
remove a whole lot of unnecessary attributes
1 parent 429d84f commit 36a2b89

16 files changed

+9
-40
lines changed

tests/compile-fail-fullmir/stacked_borrows/alias_through_mutation.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(unused_variables)]
2-
31
// This makes a ref that was passed to us via &mut alias with things it should not alias with
42
fn retarget(x: &mut &u32, target: &mut u32) {
53
unsafe { *x = &mut *(target as *mut _); }

tests/compile-fail-fullmir/stacked_borrows/aliasing_mut1.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
#![allow(unused_variables)]
2-
31
use std::mem;
42

5-
pub fn safe(x: &mut i32, y: &mut i32) {} //~ ERROR barrier
3+
pub fn safe(_x: &mut i32, _y: &mut i32) {} //~ ERROR barrier
64

75
fn main() {
86
let mut x = 0;

tests/compile-fail-fullmir/stacked_borrows/aliasing_mut2.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
#![allow(unused_variables)]
2-
31
use std::mem;
42

5-
pub fn safe(x: &i32, y: &mut i32) {} //~ ERROR barrier
3+
pub fn safe(_x: &i32, _y: &mut i32) {} //~ ERROR barrier
64

75
fn main() {
86
let mut x = 0;

tests/compile-fail-fullmir/stacked_borrows/aliasing_mut3.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
#![allow(unused_variables)]
2-
31
use std::mem;
42

5-
pub fn safe(x: &mut i32, y: &i32) {} //~ ERROR does not exist on the stack
3+
pub fn safe(_x: &mut i32, _y: &i32) {} //~ ERROR does not exist on the stack
64

75
fn main() {
86
let mut x = 0;

tests/compile-fail-fullmir/stacked_borrows/aliasing_mut4.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
#![allow(unused_variables)]
2-
31
use std::mem;
42
use std::cell::Cell;
53

64
// Make sure &mut UnsafeCell also is exclusive
7-
pub fn safe(x: &i32, y: &mut Cell<i32>) {} //~ ERROR barrier
5+
pub fn safe(_x: &i32, _y: &mut Cell<i32>) {} //~ ERROR barrier
86

97
fn main() {
108
let mut x = 0;

tests/compile-fail-fullmir/stacked_borrows/buggy_split_at_mut.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(unused_variables)]
2-
31
mod safe {
42
use std::slice::from_raw_parts_mut;
53

tests/compile-fail-fullmir/stacked_borrows/illegal_write2.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(unused_variables)]
2-
31
fn main() {
42
let target = &mut 42;
53
let target2 = target as *mut _;

tests/compile-fail/never_transmute_humans.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@
22
// compile-flags: -Zmiri-disable-validation
33

44
#![feature(never_type)]
5-
#![allow(unreachable_code)]
6-
#![allow(unused_variables)]
75

86
struct Human;
97

108
fn main() {
11-
let x: ! = unsafe {
9+
let _x: ! = unsafe {
1210
std::mem::transmute::<Human, !>(Human) //~ ERROR constant evaluation error
1311
//^~ NOTE entered unreachable code
1412
};
15-
f(x)
1613
}
17-
18-
fn f(x: !) -> ! { x }

tests/compile-fail/never_transmute_void.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// compile-flags: -Zmiri-disable-validation
33

44
#![feature(never_type)]
5-
#![allow(unreachable_code)]
6-
#![allow(unused_variables)]
75

86
enum Void {}
97

tests/compile-fail/validity/transmute_through_ptr.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(unused_variables)]
2-
31
#[repr(u32)]
42
enum Bool { True }
53

tests/run-pass/dst-struct.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
12-
#![allow(unused_features)]
1311
#![feature(box_syntax)]
1412

1513
struct Fat<T: ?Sized> {

tests/run-pass/issue-31267-additional.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(unused_variables)]
12-
1311
#[derive(Clone, Copy, Debug)]
1412
struct Bar;
1513

@@ -25,5 +23,5 @@ impl Biz {
2523
}
2624

2725
fn main() {
28-
let foo = Biz::BAZ;
26+
let _foo = Biz::BAZ;
2927
}

tests/run-pass/many_shr_bor.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Make sure validation can handle many overlapping shared borrows for different parts of a data structure
2-
#![allow(unused_variables)]
32
use std::cell::RefCell;
43

54
struct Test {
@@ -25,9 +24,9 @@ fn test2(r: &mut RefCell<i32>) {
2524
let x = &*r; // releasing write lock, first suspension recorded
2625
let mut x_ref = x.borrow_mut();
2726
let x_inner : &mut i32 = &mut *x_ref; // new inner write lock, with same lifetime as outer lock
28-
let x_inner_shr = &*x_inner; // releasing inner write lock, recording suspension
29-
let y = &*r; // second suspension for the outer write lock
30-
let x_inner_shr2 = &*x_inner; // 2nd suspension for inner write lock
27+
let _x_inner_shr = &*x_inner; // releasing inner write lock, recording suspension
28+
let _y = &*r; // second suspension for the outer write lock
29+
let _x_inner_shr2 = &*x_inner; // 2nd suspension for inner write lock
3130
}
3231

3332
fn main() {

tests/run-pass/move-arg-2-unique.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(unused_features, unused_variables)]
1211
#![feature(box_syntax)]
1312

1413
fn test(foo: Box<Vec<isize>> ) { assert_eq!((*foo)[0], 10); }

tests/run-pass/move-arg-3-unique.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(unused_features, unused_variables)]
1211
#![feature(box_syntax)]
1312

1413
pub fn main() {

tests/run-pass/regions-lifetime-nonfree-late-bound.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
// doing region-folding, when really all clients of the region-folding
2323
// case only want to see FREE lifetime variables, not bound ones.
2424

25-
#![allow(unused_features)]
2625
#![feature(box_syntax)]
2726

2827
pub fn main() {

0 commit comments

Comments
 (0)