Skip to content

Commit bf544fa

Browse files
committed
remove #[rustc_error] from ui/ tests that remain compile-fail tests.
1 parent 8315b11 commit bf544fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+82
-82
lines changed

src/test/ui/asm/asm-bad-clobber.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
// ignore-mips
2222
// ignore-mips64
2323

24-
#![feature(asm, rustc_attrs)]
24+
#![feature(asm)]
2525

2626
#[cfg(any(target_arch = "x86",
2727
target_arch = "x86_64"))]
28-
#[rustc_error]
28+
2929
pub fn main() {
3030
unsafe {
3131
// clobber formatted as register input/output

src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// aux-build:coherence_copy_like_lib.rs
1515

16-
#![feature(rustc_attrs)]
16+
1717

1818
extern crate coherence_copy_like_lib as lib;
1919

@@ -26,5 +26,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
2626
// Tuples are not fundamental.
2727
impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } //~ ERROR E0119
2828

29-
#[rustc_error]
29+
3030
fn main() { }

src/test/ui/coherence/coherence_local_err_struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// aux-build:coherence_copy_like_lib.rs
1515

16-
#![feature(rustc_attrs)]
16+
1717
#![allow(dead_code)]
1818

1919
extern crate coherence_copy_like_lib as lib;
@@ -25,5 +25,5 @@ struct MyType { x: i32 }
2525
// MyStruct is not fundamental.
2626
impl lib::MyCopy for lib::MyStruct<MyType> { } //~ ERROR E0117
2727

28-
#[rustc_error]
28+
2929
fn main() { }

src/test/ui/coherence/coherence_local_err_tuple.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// aux-build:coherence_copy_like_lib.rs
1515

16-
#![feature(rustc_attrs)]
16+
1717
#![allow(dead_code)]
1818

1919
extern crate coherence_copy_like_lib as lib;
@@ -25,5 +25,5 @@ struct MyType { x: i32 }
2525
// Tuples are not fundamental, so this is not a local impl.
2626
impl lib::MyCopy for (MyType,) { } //~ ERROR E0117
2727

28-
#[rustc_error]
28+
2929
fn main() { }

src/test/ui/feature-gates/feature-gate-custom_attribute.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Check that literals in attributes parse just fine.
1212

13-
#![feature(rustc_attrs)]
13+
1414
#![allow(dead_code)]
1515
#![allow(unused_variables)]
1616

@@ -29,5 +29,5 @@
2929
#[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown
3030
struct Q { }
3131

32-
#[rustc_error]
32+
3333
fn main() { }

src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#![allow(dead_code)]
1717
#![allow(unused_variables)]
18-
#![feature(rustc_attrs)]
18+
1919

2020
extern crate lifetime_bound_will_change_warning_lib as lib;
2121

@@ -59,6 +59,6 @@ fn test3cc<'a>(x: &'a Box<Fn()+'static>) {
5959
lib::ref_obj(x)
6060
}
6161

62-
#[rustc_error]
62+
6363
fn main() {
6464
}

src/test/ui/on-unimplemented/multiple-impls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test if the on_unimplemented message override works
1212

1313
#![feature(on_unimplemented)]
14-
#![feature(rustc_attrs)]
14+
1515

1616
struct Foo<T>(T);
1717
struct Bar<T>(T);
@@ -38,7 +38,7 @@ impl Index<Bar<usize>> for [i32] {
3838
}
3939
}
4040

41-
#[rustc_error]
41+
4242
fn main() {
4343
Index::index(&[] as &[i32], 2u32);
4444
//~^ ERROR E0277

src/test/ui/on-unimplemented/on-impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test if the on_unimplemented message override works
1212

1313
#![feature(on_unimplemented)]
14-
#![feature(rustc_attrs)]
14+
1515

1616
#[rustc_on_unimplemented = "invalid"]
1717
trait Index<Idx: ?Sized> {
@@ -27,7 +27,7 @@ impl Index<usize> for [i32] {
2727
}
2828
}
2929

30-
#[rustc_error]
30+
3131
fn main() {
3232
Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32);
3333
//~^ ERROR E0277

src/test/ui/on-unimplemented/slice-index.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
// Test new Index error message for slices
1212
// ignore-tidy-linelength
1313

14-
#![feature(rustc_attrs)]
14+
1515

1616
use std::ops::Index;
1717

18-
#[rustc_error]
18+
1919
fn main() {
2020
let x = &[1, 2, 3] as &[i32];
2121
x[1i32]; //~ ERROR E0277

src/test/ui/regions/regions-outlives-projection-container-hrtb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// "outlives" requirements. Issue #22246.
1313

1414
#![allow(dead_code)]
15-
#![feature(rustc_attrs)]
15+
1616

1717
///////////////////////////////////////////////////////////////////////////
1818

@@ -64,6 +64,6 @@ fn with_assoc_sub<'a,'b>() {
6464
//~^ ERROR reference has a longer lifetime
6565
}
6666

67-
#[rustc_error]
67+
6868
fn main() {
6969
}

src/test/ui/retslot-cast.rs

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

11-
#![feature(rustc_attrs)]
11+
1212
#![allow(warnings)]
1313

1414
pub fn fail(x: Option<&(Iterator<Item=()>+Send)>)
@@ -29,5 +29,5 @@ pub fn inner(x: Option<&(Iterator<Item=()>+Send)>)
2929
x
3030
}
3131

32-
#[rustc_error]
32+
3333
fn main() {}

src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//
1414
// Rule OutlivesNominalType from RFC 1214.
1515

16-
#![feature(rustc_attrs)]
16+
1717
#![allow(dead_code)]
1818

1919
mod rev_variant_struct_region {
@@ -28,5 +28,5 @@ mod rev_variant_struct_region {
2828
}
2929
}
3030

31-
#[rustc_error]
31+
3232
fn main() { }

src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//
1414
// Rule OutlivesNominalType from RFC 1214.
1515

16-
#![feature(rustc_attrs)]
16+
1717
#![allow(dead_code)]
1818

1919
mod variant_struct_region {
@@ -28,5 +28,5 @@ mod variant_struct_region {
2828
}
2929
}
3030

31-
#[rustc_error]
31+
3232
fn main() { }

src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//
1414
// Rule OutlivesNominalType from RFC 1214.
1515

16-
#![feature(rustc_attrs)]
16+
1717
#![allow(dead_code)]
1818

1919
mod variant_struct_type {
@@ -28,5 +28,5 @@ mod variant_struct_type {
2828
}
2929
}
3030

31-
#[rustc_error]
31+
3232
fn main() { }

src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//
1414
// Rule OutlivesNominalType from RFC 1214.
1515

16-
#![feature(rustc_attrs)]
16+
1717
#![allow(dead_code)]
1818

1919
mod variant_struct_type {
@@ -28,5 +28,5 @@ mod variant_struct_type {
2828
}
2929
}
3030

31-
#[rustc_error]
31+
3232
fn main() { }

src/test/ui/variance/variance-btree-invariant-types.rs

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

11-
#![feature(rustc_attrs)]
11+
1212

1313
use std::collections::btree_map::{IterMut, OccupiedEntry, VacantEntry};
1414

@@ -59,5 +59,5 @@ fn vac_contra_val<'a, 'new>(v: VacantEntry<'a, (), &'new ()>)
5959
v //~ ERROR mismatched types
6060
}
6161

62-
#[rustc_error]
62+
6363
fn main() { }

src/test/ui/variance/variance-use-contravariant-struct-1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test various uses of structs with distint variances to make sure
1212
// they permit lifetimes to be approximated as expected.
1313

14-
#![feature(rustc_attrs)]
14+
1515

1616
struct SomeStruct<T>(fn(T));
1717

@@ -22,5 +22,5 @@ fn foo<'min,'max>(v: SomeStruct<&'max ()>)
2222
v //~ ERROR mismatched types
2323
}
2424

25-
#[rustc_error]
25+
2626
fn main() { }

src/test/ui/variance/variance-use-invariant-struct-1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test various uses of structs with distint variances to make sure
1212
// they permit lifetimes to be approximated as expected.
1313

14-
#![feature(rustc_attrs)]
14+
1515

1616
struct SomeStruct<T>(*mut T);
1717

@@ -29,5 +29,5 @@ fn bar<'min,'max>(v: SomeStruct<&'min ()>)
2929
v //~ ERROR mismatched types
3030
}
3131

32-
#[rustc_error]
32+
3333
fn main() { }

src/test/ui/wf/wf-array-elem-sized.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
// Check that array elemen types must be Sized. Issue #25692.
1212

13-
#![feature(rustc_attrs)]
13+
1414
#![allow(dead_code)]
1515

1616
struct Foo {
1717
foo: [[u8]], //~ ERROR E0277
1818
}
1919

20-
#[rustc_error]
20+
2121
fn main() { }

src/test/ui/wf/wf-const-type.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test that we check the types of constants are well-formed.
1212

1313
#![feature(associated_type_defaults)]
14-
#![feature(rustc_attrs)]
14+
1515
#![allow(dead_code)]
1616

1717
struct IsCopy<T:Copy> { t: T }
@@ -20,5 +20,5 @@ struct NotCopy;
2020
const FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
2121
//~^ ERROR E0277
2222

23-
#[rustc_error]
23+
2424
fn main() { }

src/test/ui/wf/wf-enum-bound.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test that we check enum bounds for WFedness.
1212

1313
#![feature(associated_type_defaults)]
14-
#![feature(rustc_attrs)]
14+
1515
#![allow(dead_code)]
1616

1717
trait ExtraCopy<T:Copy> { }
@@ -22,5 +22,5 @@ enum SomeEnum<T,U> //~ ERROR E0277
2222
SomeVariant(T,U)
2323
}
2424

25-
#[rustc_error]
25+
2626
fn main() { }

src/test/ui/wf/wf-enum-fields-struct-variant.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test that we check struct fields for WFedness.
1212

1313
#![feature(associated_type_defaults)]
14-
#![feature(rustc_attrs)]
14+
1515
#![allow(dead_code)]
1616

1717
struct IsCopy<T:Copy> {
@@ -24,5 +24,5 @@ enum AnotherEnum<A> {
2424
}
2525
}
2626

27-
#[rustc_error]
27+
2828
fn main() { }

src/test/ui/wf/wf-enum-fields.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test that we check struct fields for WFedness.
1212

1313
#![feature(associated_type_defaults)]
14-
#![feature(rustc_attrs)]
14+
1515
#![allow(dead_code)]
1616

1717
struct IsCopy<T:Copy> {
@@ -22,5 +22,5 @@ enum SomeEnum<A> {
2222
SomeVariant(IsCopy<A>) //~ ERROR E0277
2323
}
2424

25-
#[rustc_error]
25+
2626
fn main() { }

src/test/ui/wf/wf-fn-where-clause.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Test that we check where-clauses on fn items.
1212

13-
#![feature(rustc_attrs)]
13+
1414
#![allow(dead_code)]
1515

1616
trait ExtraCopy<T:Copy> { }
@@ -23,5 +23,5 @@ fn bar() where Vec<dyn Copy>:, {}
2323
//~^ ERROR E0277
2424
//~| ERROR E0038
2525

26-
#[rustc_error]
26+
2727
fn main() { }

0 commit comments

Comments
 (0)