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