提交 bf544fa9 编写于 作者: F Felix S. Klock II

remove `#[rustc_error]` from ui/ tests that remain compile-fail tests.

上级 8315b11b
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
// ignore-mips // ignore-mips
// ignore-mips64 // ignore-mips64
#![feature(asm, rustc_attrs)] #![feature(asm)]
#[cfg(any(target_arch = "x86", #[cfg(any(target_arch = "x86",
target_arch = "x86_64"))] target_arch = "x86_64"))]
#[rustc_error]
pub fn main() { pub fn main() {
unsafe { unsafe {
// clobber formatted as register input/output // clobber formatted as register input/output
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// aux-build:coherence_copy_like_lib.rs // aux-build:coherence_copy_like_lib.rs
#![feature(rustc_attrs)]
extern crate coherence_copy_like_lib as lib; extern crate coherence_copy_like_lib as lib;
...@@ -26,5 +26,5 @@ impl<T: lib::MyCopy> MyTrait for T { } ...@@ -26,5 +26,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
// Tuples are not fundamental. // Tuples are not fundamental.
impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } //~ ERROR E0119 impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } //~ ERROR E0119
#[rustc_error]
fn main() { } fn main() { }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// aux-build:coherence_copy_like_lib.rs // aux-build:coherence_copy_like_lib.rs
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
extern crate coherence_copy_like_lib as lib; extern crate coherence_copy_like_lib as lib;
...@@ -25,5 +25,5 @@ struct MyType { x: i32 } ...@@ -25,5 +25,5 @@ struct MyType { x: i32 }
// MyStruct is not fundamental. // MyStruct is not fundamental.
impl lib::MyCopy for lib::MyStruct<MyType> { } //~ ERROR E0117 impl lib::MyCopy for lib::MyStruct<MyType> { } //~ ERROR E0117
#[rustc_error]
fn main() { } fn main() { }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// aux-build:coherence_copy_like_lib.rs // aux-build:coherence_copy_like_lib.rs
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
extern crate coherence_copy_like_lib as lib; extern crate coherence_copy_like_lib as lib;
...@@ -25,5 +25,5 @@ struct MyType { x: i32 } ...@@ -25,5 +25,5 @@ struct MyType { x: i32 }
// Tuples are not fundamental, so this is not a local impl. // Tuples are not fundamental, so this is not a local impl.
impl lib::MyCopy for (MyType,) { } //~ ERROR E0117 impl lib::MyCopy for (MyType,) { } //~ ERROR E0117
#[rustc_error]
fn main() { } fn main() { }
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Check that literals in attributes parse just fine. // Check that literals in attributes parse just fine.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_variables)] #![allow(unused_variables)]
...@@ -29,5 +29,5 @@ ...@@ -29,5 +29,5 @@
#[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown
struct Q { } struct Q { }
#[rustc_error]
fn main() { } fn main() { }
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_variables)] #![allow(unused_variables)]
#![feature(rustc_attrs)]
extern crate lifetime_bound_will_change_warning_lib as lib; extern crate lifetime_bound_will_change_warning_lib as lib;
...@@ -59,6 +59,6 @@ fn test3cc<'a>(x: &'a Box<Fn()+'static>) { ...@@ -59,6 +59,6 @@ fn test3cc<'a>(x: &'a Box<Fn()+'static>) {
lib::ref_obj(x) lib::ref_obj(x)
} }
#[rustc_error]
fn main() { fn main() {
} }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test if the on_unimplemented message override works // Test if the on_unimplemented message override works
#![feature(on_unimplemented)] #![feature(on_unimplemented)]
#![feature(rustc_attrs)]
struct Foo<T>(T); struct Foo<T>(T);
struct Bar<T>(T); struct Bar<T>(T);
...@@ -38,7 +38,7 @@ fn index(&self, _index: Bar<usize>) -> &i32 { ...@@ -38,7 +38,7 @@ fn index(&self, _index: Bar<usize>) -> &i32 {
} }
} }
#[rustc_error]
fn main() { fn main() {
Index::index(&[] as &[i32], 2u32); Index::index(&[] as &[i32], 2u32);
//~^ ERROR E0277 //~^ ERROR E0277
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test if the on_unimplemented message override works // Test if the on_unimplemented message override works
#![feature(on_unimplemented)] #![feature(on_unimplemented)]
#![feature(rustc_attrs)]
#[rustc_on_unimplemented = "invalid"] #[rustc_on_unimplemented = "invalid"]
trait Index<Idx: ?Sized> { trait Index<Idx: ?Sized> {
...@@ -27,7 +27,7 @@ fn index(&self, index: usize) -> &i32 { ...@@ -27,7 +27,7 @@ fn index(&self, index: usize) -> &i32 {
} }
} }
#[rustc_error]
fn main() { fn main() {
Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32); Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32);
//~^ ERROR E0277 //~^ ERROR E0277
......
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
// Test new Index error message for slices // Test new Index error message for slices
// ignore-tidy-linelength // ignore-tidy-linelength
#![feature(rustc_attrs)]
use std::ops::Index; use std::ops::Index;
#[rustc_error]
fn main() { fn main() {
let x = &[1, 2, 3] as &[i32]; let x = &[1, 2, 3] as &[i32];
x[1i32]; //~ ERROR E0277 x[1i32]; //~ ERROR E0277
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// "outlives" requirements. Issue #22246. // "outlives" requirements. Issue #22246.
#![allow(dead_code)] #![allow(dead_code)]
#![feature(rustc_attrs)]
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
...@@ -64,6 +64,6 @@ fn with_assoc_sub<'a,'b>() { ...@@ -64,6 +64,6 @@ fn with_assoc_sub<'a,'b>() {
//~^ ERROR reference has a longer lifetime //~^ ERROR reference has a longer lifetime
} }
#[rustc_error]
fn main() { fn main() {
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(rustc_attrs)]
#![allow(warnings)] #![allow(warnings)]
pub fn fail(x: Option<&(Iterator<Item=()>+Send)>) pub fn fail(x: Option<&(Iterator<Item=()>+Send)>)
...@@ -29,5 +29,5 @@ pub fn inner(x: Option<&(Iterator<Item=()>+Send)>) ...@@ -29,5 +29,5 @@ pub fn inner(x: Option<&(Iterator<Item=()>+Send)>)
x x
} }
#[rustc_error]
fn main() {} fn main() {}
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// //
// Rule OutlivesNominalType from RFC 1214. // Rule OutlivesNominalType from RFC 1214.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
mod rev_variant_struct_region { mod rev_variant_struct_region {
...@@ -28,5 +28,5 @@ impl<'a, 'b> Trait<'a, 'b> for usize { ...@@ -28,5 +28,5 @@ impl<'a, 'b> Trait<'a, 'b> for usize {
} }
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// //
// Rule OutlivesNominalType from RFC 1214. // Rule OutlivesNominalType from RFC 1214.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
mod variant_struct_region { mod variant_struct_region {
...@@ -28,5 +28,5 @@ impl<'a, 'b> Trait<'a, 'b> for usize { ...@@ -28,5 +28,5 @@ impl<'a, 'b> Trait<'a, 'b> for usize {
} }
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// //
// Rule OutlivesNominalType from RFC 1214. // Rule OutlivesNominalType from RFC 1214.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
mod variant_struct_type { mod variant_struct_type {
...@@ -28,5 +28,5 @@ impl<'a, 'b> Trait<'a, 'b> for usize { ...@@ -28,5 +28,5 @@ impl<'a, 'b> Trait<'a, 'b> for usize {
} }
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// //
// Rule OutlivesNominalType from RFC 1214. // Rule OutlivesNominalType from RFC 1214.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
mod variant_struct_type { mod variant_struct_type {
...@@ -28,5 +28,5 @@ impl<'a, 'b> Trait<'a, 'b> for usize { ...@@ -28,5 +28,5 @@ impl<'a, 'b> Trait<'a, 'b> for usize {
} }
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(rustc_attrs)]
use std::collections::btree_map::{IterMut, OccupiedEntry, VacantEntry}; use std::collections::btree_map::{IterMut, OccupiedEntry, VacantEntry};
...@@ -59,5 +59,5 @@ fn vac_contra_val<'a, 'new>(v: VacantEntry<'a, (), &'new ()>) ...@@ -59,5 +59,5 @@ fn vac_contra_val<'a, 'new>(v: VacantEntry<'a, (), &'new ()>)
v //~ ERROR mismatched types v //~ ERROR mismatched types
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test various uses of structs with distint variances to make sure // Test various uses of structs with distint variances to make sure
// they permit lifetimes to be approximated as expected. // they permit lifetimes to be approximated as expected.
#![feature(rustc_attrs)]
struct SomeStruct<T>(fn(T)); struct SomeStruct<T>(fn(T));
...@@ -22,5 +22,5 @@ fn foo<'min,'max>(v: SomeStruct<&'max ()>) ...@@ -22,5 +22,5 @@ fn foo<'min,'max>(v: SomeStruct<&'max ()>)
v //~ ERROR mismatched types v //~ ERROR mismatched types
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test various uses of structs with distint variances to make sure // Test various uses of structs with distint variances to make sure
// they permit lifetimes to be approximated as expected. // they permit lifetimes to be approximated as expected.
#![feature(rustc_attrs)]
struct SomeStruct<T>(*mut T); struct SomeStruct<T>(*mut T);
...@@ -29,5 +29,5 @@ fn bar<'min,'max>(v: SomeStruct<&'min ()>) ...@@ -29,5 +29,5 @@ fn bar<'min,'max>(v: SomeStruct<&'min ()>)
v //~ ERROR mismatched types v //~ ERROR mismatched types
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
// Check that array elemen types must be Sized. Issue #25692. // Check that array elemen types must be Sized. Issue #25692.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
struct Foo { struct Foo {
foo: [[u8]], //~ ERROR E0277 foo: [[u8]], //~ ERROR E0277
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check the types of constants are well-formed. // Test that we check the types of constants are well-formed.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
struct IsCopy<T:Copy> { t: T } struct IsCopy<T:Copy> { t: T }
...@@ -20,5 +20,5 @@ struct IsCopy<T:Copy> { t: T } ...@@ -20,5 +20,5 @@ struct IsCopy<T:Copy> { t: T }
const FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; const FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
//~^ ERROR E0277 //~^ ERROR E0277
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check enum bounds for WFedness. // Test that we check enum bounds for WFedness.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait ExtraCopy<T:Copy> { } trait ExtraCopy<T:Copy> { }
...@@ -22,5 +22,5 @@ enum SomeEnum<T,U> //~ ERROR E0277 ...@@ -22,5 +22,5 @@ enum SomeEnum<T,U> //~ ERROR E0277
SomeVariant(T,U) SomeVariant(T,U)
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check struct fields for WFedness. // Test that we check struct fields for WFedness.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
struct IsCopy<T:Copy> { struct IsCopy<T:Copy> {
...@@ -24,5 +24,5 @@ enum AnotherEnum<A> { ...@@ -24,5 +24,5 @@ enum AnotherEnum<A> {
} }
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check struct fields for WFedness. // Test that we check struct fields for WFedness.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
struct IsCopy<T:Copy> { struct IsCopy<T:Copy> {
...@@ -22,5 +22,5 @@ enum SomeEnum<A> { ...@@ -22,5 +22,5 @@ enum SomeEnum<A> {
SomeVariant(IsCopy<A>) //~ ERROR E0277 SomeVariant(IsCopy<A>) //~ ERROR E0277
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Test that we check where-clauses on fn items. // Test that we check where-clauses on fn items.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait ExtraCopy<T:Copy> { } trait ExtraCopy<T:Copy> { }
...@@ -23,5 +23,5 @@ fn bar() where Vec<dyn Copy>:, {} ...@@ -23,5 +23,5 @@ fn bar() where Vec<dyn Copy>:, {}
//~^ ERROR E0277 //~^ ERROR E0277
//~| ERROR E0038 //~| ERROR E0038
#[rustc_error]
fn main() { } fn main() { }
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Check that we require that associated types in an impl are well-formed. // Check that we require that associated types in an impl are well-formed.
#![feature(rustc_attrs)]
pub trait Foo<'a> { pub trait Foo<'a> {
type Bar; type Bar;
...@@ -20,5 +20,5 @@ impl<'a, T> Foo<'a> for T { ...@@ -20,5 +20,5 @@ impl<'a, T> Foo<'a> for T {
type Bar = &'a T; //~ ERROR E0309 type Bar = &'a T; //~ ERROR E0309
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Check that we require that associated types in an impl are well-formed. // Check that we require that associated types in an impl are well-formed.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
pub trait MyHash { } pub trait MyHash { }
...@@ -28,5 +28,5 @@ impl<T> Foo for T { ...@@ -28,5 +28,5 @@ impl<T> Foo for T {
//~^ ERROR the trait bound `T: MyHash` is not satisfied //~^ ERROR the trait bound `T: MyHash` is not satisfied
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// types in fns. // types in fns.
#![allow(dead_code)] #![allow(dead_code)]
#![feature(rustc_attrs)]
struct MustBeCopy<T:Copy> { struct MustBeCopy<T:Copy> {
t: T t: T
...@@ -28,5 +28,5 @@ struct Bar<T> { ...@@ -28,5 +28,5 @@ struct Bar<T> {
x: fn(&'static T) //~ ERROR E0310 x: fn(&'static T) //~ ERROR E0310
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Check that we enforce WF conditions also for where clauses in fn items. // Check that we enforce WF conditions also for where clauses in fn items.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait MustBeCopy<T:Copy> { trait MustBeCopy<T:Copy> {
...@@ -21,5 +21,5 @@ fn bar<T,U>() //~ ERROR E0277 ...@@ -21,5 +21,5 @@ fn bar<T,U>() //~ ERROR E0277
{ {
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Check that we enforce WF conditions also for types in fns. // Check that we enforce WF conditions also for types in fns.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait Object<T> { } trait Object<T> { }
...@@ -24,5 +24,5 @@ struct Foo<T> { ...@@ -24,5 +24,5 @@ struct Foo<T> {
x: Object<&'static T> //~ ERROR E0310 x: Object<&'static T> //~ ERROR E0310
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check where-clauses on inherent impl methods. // Test that we check where-clauses on inherent impl methods.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait ExtraCopy<T:Copy> { } trait ExtraCopy<T:Copy> { }
...@@ -23,5 +23,5 @@ fn foo(self) where T: ExtraCopy<U> //~ ERROR E0277 ...@@ -23,5 +23,5 @@ fn foo(self) where T: ExtraCopy<U> //~ ERROR E0277
{} {}
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check where-clauses on inherent impls. // Test that we check where-clauses on inherent impls.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait ExtraCopy<T:Copy> { } trait ExtraCopy<T:Copy> { }
...@@ -22,5 +22,5 @@ impl<T,U> Foo<T,U> where T: ExtraCopy<U> //~ ERROR E0277 ...@@ -22,5 +22,5 @@ impl<T,U> Foo<T,U> where T: ExtraCopy<U> //~ ERROR E0277
{ {
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check the types of statics are well-formed. // Test that we check the types of statics are well-formed.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
struct IsCopy<T:Copy> { t: T } struct IsCopy<T:Copy> { t: T }
...@@ -20,5 +20,5 @@ struct IsCopy<T:Copy> { t: T } ...@@ -20,5 +20,5 @@ struct IsCopy<T:Copy> { t: T }
static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
//~^ ERROR E0277 //~^ ERROR E0277
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check struct bounds for WFedness. // Test that we check struct bounds for WFedness.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait ExtraCopy<T:Copy> { } trait ExtraCopy<T:Copy> { }
...@@ -22,5 +22,5 @@ struct SomeStruct<T,U> //~ ERROR E0277 ...@@ -22,5 +22,5 @@ struct SomeStruct<T,U> //~ ERROR E0277
data: (T,U) data: (T,U)
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check struct fields for WFedness. // Test that we check struct fields for WFedness.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
struct IsCopy<T:Copy> { struct IsCopy<T:Copy> {
...@@ -22,5 +22,5 @@ struct SomeStruct<A> { ...@@ -22,5 +22,5 @@ struct SomeStruct<A> {
data: IsCopy<A> //~ ERROR E0277 data: IsCopy<A> //~ ERROR E0277
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check associated type bounds for WFedness. // Test that we check associated type bounds for WFedness.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait ExtraCopy<T:Copy> { } trait ExtraCopy<T:Copy> { }
...@@ -20,5 +20,5 @@ trait SomeTrait<T> { //~ ERROR E0277 ...@@ -20,5 +20,5 @@ trait SomeTrait<T> { //~ ERROR E0277
type Type1: ExtraCopy<T>; type Type1: ExtraCopy<T>;
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check associated type default values for WFedness. // Test that we check associated type default values for WFedness.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait SomeTrait<'a> { trait SomeTrait<'a> {
...@@ -20,5 +20,5 @@ trait SomeTrait<'a> { ...@@ -20,5 +20,5 @@ trait SomeTrait<'a> {
//~^ ERROR E0309 //~^ ERROR E0309
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check associated type default values for WFedness. // Test that we check associated type default values for WFedness.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
struct IsCopy<T:Copy> { x: T } struct IsCopy<T:Copy> { x: T }
...@@ -22,5 +22,5 @@ trait SomeTrait { ...@@ -22,5 +22,5 @@ trait SomeTrait {
//~^ ERROR E0277 //~^ ERROR E0277
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Test that we check supertrait bounds for WFedness. // Test that we check supertrait bounds for WFedness.
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
trait ExtraCopy<T:Copy> { } trait ExtraCopy<T:Copy> { }
...@@ -21,5 +21,5 @@ trait SomeTrait<T,U> //~ ERROR E0277 ...@@ -21,5 +21,5 @@ trait SomeTrait<T,U> //~ ERROR E0277
{ {
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Check that we test WF conditions for fn arguments. Because the // Check that we test WF conditions for fn arguments. Because the
// current code is so goofy, this is only a warning for now. // current code is so goofy, this is only a warning for now.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_variables)] #![allow(unused_variables)]
...@@ -25,5 +25,5 @@ fn bar(&self, x: &Bar<Self>) { ...@@ -25,5 +25,5 @@ fn bar(&self, x: &Bar<Self>) {
} }
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Check that we test WF conditions for fn arguments. Because the // Check that we test WF conditions for fn arguments. Because the
// current code is so goofy, this is only a warning for now. // current code is so goofy, this is only a warning for now.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_variables)] #![allow(unused_variables)]
...@@ -25,5 +25,5 @@ fn bar<A>(&self) where A: Bar<Self> { ...@@ -25,5 +25,5 @@ fn bar<A>(&self) where A: Bar<Self> {
} }
} }
#[rustc_error]
fn main() { } fn main() { }
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Check that we test WF conditions for fn where clauses in a trait definition. // Check that we test WF conditions for fn where clauses in a trait definition.
#![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_variables)] #![allow(unused_variables)]
...@@ -23,5 +23,5 @@ trait Foo { ...@@ -23,5 +23,5 @@ trait Foo {
// Here, Eq ought to be implemented. // Here, Eq ought to be implemented.
} }
#[rustc_error]
fn main() { } fn main() { }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册