remove a whole lot of unnecessary attributes

This commit is contained in:
Ralf Jung 2018-12-02 11:26:09 +01:00
parent 429d84f068
commit 36a2b89522
16 changed files with 9 additions and 40 deletions

View File

@ -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 _); }

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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<i32>) {} //~ ERROR barrier
pub fn safe(_x: &i32, _y: &mut Cell<i32>) {} //~ ERROR barrier
fn main() {
let mut x = 0;

View File

@ -1,5 +1,3 @@
#![allow(unused_variables)]
mod safe {
use std::slice::from_raw_parts_mut;

View File

@ -1,5 +1,3 @@
#![allow(unused_variables)]
fn main() {
let target = &mut 42;
let target2 = target as *mut _;

View File

@ -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, !>(Human) //~ ERROR constant evaluation error
//^~ NOTE entered unreachable code
};
f(x)
}
fn f(x: !) -> ! { x }

View File

@ -2,8 +2,6 @@
// compile-flags: -Zmiri-disable-validation
#![feature(never_type)]
#![allow(unreachable_code)]
#![allow(unused_variables)]
enum Void {}

View File

@ -1,5 +1,3 @@
#![allow(unused_variables)]
#[repr(u32)]
enum Bool { True }

View File

@ -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<T: ?Sized> {

View File

@ -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;
}

View File

@ -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<i32>) {
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() {

View File

@ -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<Vec<isize>> ) { assert_eq!((*foo)[0], 10); }

View File

@ -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() {

View File

@ -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() {