Skip to content

Commit 1bbf718

Browse files
committed
Fix tests for rustc_*
1 parent 0129002 commit 1bbf718

15 files changed

+30
-0
lines changed

src/test/compile-fail/move-fragments-1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
// These are all fairly trivial cases: unused variables or direct
1919
// drops of substructure.
2020

21+
#![feature(rustc_attrs)]
22+
2123
pub struct D { d: isize }
2224
impl Drop for D { fn drop(&mut self) { } }
2325

src/test/compile-fail/move-fragments-2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
// These are checking that enums are tracked; note that their output
1919
// paths include "downcasts" of the path to a particular enum.
2020

21+
#![feature(rustc_attrs)]
22+
2123
use self::Lonely::{Zero, One, Two};
2224

2325
pub struct D { d: isize }

src/test/compile-fail/move-fragments-3.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
// This checks the handling of `_` within variants, especially when mixed
1919
// with bindings.
2020

21+
#![feature(rustc_attrs)]
22+
2123
use self::Lonely::{Zero, One, Two};
2224

2325
pub struct D { d: isize }

src/test/compile-fail/move-fragments-4.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// early draft of the code did not properly traverse up through all of
2020
// the parents of the leaf fragment.)
2121

22+
#![feature(rustc_attrs)]
23+
2224
pub struct D { d: isize }
2325
impl Drop for D { fn drop(&mut self) { } }
2426

src/test/compile-fail/move-fragments-5.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
// This is the first test that checks moving into local variables.
1919

20+
#![feature(rustc_attrs)]
21+
2022
pub struct D { d: isize }
2123
impl Drop for D { fn drop(&mut self) { } }
2224

src/test/compile-fail/move-fragments-6.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
// Test that moving into a field (i.e. overwriting it) fragments the
1919
// receiver.
2020

21+
#![feature(rustc_attrs)]
22+
2123
use std::mem::drop;
2224

2325
pub struct Pair<X,Y> { x: X, y: Y }

src/test/compile-fail/move-fragments-7.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// both moving out of the structure (i.e. reading `*p.x`) and writing
2020
// into the container (i.e. writing `*p.x`).
2121

22+
#![feature(rustc_attrs)]
23+
2224
pub struct D { d: isize }
2325
impl Drop for D { fn drop(&mut self) { } }
2426

src/test/compile-fail/move-fragments-8.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
// also that in this case we cannot do a move out of `&T`, so we only
2323
// test writing `*p.x` here.
2424

25+
#![feature(rustc_attrs)]
26+
2527
pub struct D { d: isize }
2628
impl Drop for D { fn drop(&mut self) { } }
2729

src/test/compile-fail/move-fragments-9.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
// Note also that the `test_move_array_then_overwrite` tests represent
1515
// cases that we probably should make illegal.
1616

17+
#![feature(rustc_attrs)]
18+
1719
pub struct D { d: isize }
1820
impl Drop for D { fn drop(&mut self) { } }
1921

src/test/compile-fail/rustc-error.rs

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

11+
#![feature(rustc_attrs)]
12+
1113
#[rustc_error]
1214
fn main() {
1315
//~^ ERROR compilation successful

src/test/compile-fail/variance-associated-types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that the variance computation considers types/regions that
1212
// appear in projections to be invariant.
1313

14+
#![feature(rustc_attrs)]
15+
1416
trait Trait<'a> {
1517
type Type;
1618

src/test/compile-fail/variance-object-types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that Cell is considered invariant with respect to its
1212
// type.
1313

14+
#![feature(rustc_attrs)]
15+
1416
use std::cell::Cell;
1517

1618
// For better or worse, associated types are invariant, and hence we

src/test/compile-fail/variance-regions-direct.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that we correctly infer variance for region parameters in
1212
// various self-contained types.
1313

14+
#![feature(rustc_attrs)]
15+
1416
// Regions that just appear in normal spots are contravariant:
1517

1618
#[rustc_variance]

src/test/compile-fail/variance-regions-indirect.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// case that involve multiple intricate types.
1313
// Try enums too.
1414

15+
#![feature(rustc_attrs)]
16+
1517
#[rustc_variance]
1618
enum Base<'a, 'b, 'c:'b, 'd> { //~ ERROR regions=[[+, -, o, *];[];[]]
1719
Test8A(extern "Rust" fn(&'a isize)),

src/test/compile-fail/variance-trait-object-bound.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
//
1515
// Issue #18262.
1616

17+
#![feature(rustc_attrs)]
18+
1719
use std::mem;
1820

1921
trait T { fn foo(); }

0 commit comments

Comments
 (0)