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

0 commit comments

Comments
 (0)