提交 1bbf7187 编写于 作者: M Manish Goregaokar

Fix tests for rustc_*

上级 0129002d
......@@ -18,6 +18,8 @@
// These are all fairly trivial cases: unused variables or direct
// drops of substructure.
#![feature(rustc_attrs)]
pub struct D { d: isize }
impl Drop for D { fn drop(&mut self) { } }
......
......@@ -18,6 +18,8 @@
// These are checking that enums are tracked; note that their output
// paths include "downcasts" of the path to a particular enum.
#![feature(rustc_attrs)]
use self::Lonely::{Zero, One, Two};
pub struct D { d: isize }
......
......@@ -18,6 +18,8 @@
// This checks the handling of `_` within variants, especially when mixed
// with bindings.
#![feature(rustc_attrs)]
use self::Lonely::{Zero, One, Two};
pub struct D { d: isize }
......
......@@ -19,6 +19,8 @@
// early draft of the code did not properly traverse up through all of
// the parents of the leaf fragment.)
#![feature(rustc_attrs)]
pub struct D { d: isize }
impl Drop for D { fn drop(&mut self) { } }
......
......@@ -17,6 +17,8 @@
// This is the first test that checks moving into local variables.
#![feature(rustc_attrs)]
pub struct D { d: isize }
impl Drop for D { fn drop(&mut self) { } }
......
......@@ -18,6 +18,8 @@
// Test that moving into a field (i.e. overwriting it) fragments the
// receiver.
#![feature(rustc_attrs)]
use std::mem::drop;
pub struct Pair<X,Y> { x: X, y: Y }
......
......@@ -19,6 +19,8 @@
// both moving out of the structure (i.e. reading `*p.x`) and writing
// into the container (i.e. writing `*p.x`).
#![feature(rustc_attrs)]
pub struct D { d: isize }
impl Drop for D { fn drop(&mut self) { } }
......
......@@ -22,6 +22,8 @@
// also that in this case we cannot do a move out of `&T`, so we only
// test writing `*p.x` here.
#![feature(rustc_attrs)]
pub struct D { d: isize }
impl Drop for D { fn drop(&mut self) { } }
......
......@@ -14,6 +14,8 @@
// Note also that the `test_move_array_then_overwrite` tests represent
// cases that we probably should make illegal.
#![feature(rustc_attrs)]
pub struct D { d: isize }
impl Drop for D { fn drop(&mut self) { } }
......
......@@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
#[rustc_error]
fn main() {
//~^ ERROR compilation successful
......
......@@ -11,6 +11,8 @@
// Test that the variance computation considers types/regions that
// appear in projections to be invariant.
#![feature(rustc_attrs)]
trait Trait<'a> {
type Type;
......
......@@ -11,6 +11,8 @@
// Test that Cell is considered invariant with respect to its
// type.
#![feature(rustc_attrs)]
use std::cell::Cell;
// For better or worse, associated types are invariant, and hence we
......
......@@ -11,6 +11,8 @@
// Test that we correctly infer variance for region parameters in
// various self-contained types.
#![feature(rustc_attrs)]
// Regions that just appear in normal spots are contravariant:
#[rustc_variance]
......
......@@ -12,6 +12,8 @@
// case that involve multiple intricate types.
// Try enums too.
#![feature(rustc_attrs)]
#[rustc_variance]
enum Base<'a, 'b, 'c:'b, 'd> { //~ ERROR regions=[[+, -, o, *];[];[]]
Test8A(extern "Rust" fn(&'a isize)),
......
......@@ -14,6 +14,8 @@
//
// Issue #18262.
#![feature(rustc_attrs)]
use std::mem;
trait T { fn foo(); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册