diff --git a/src/test/ui/asm/asm-bad-clobber.rs b/src/test/ui/asm/asm-bad-clobber.rs index c2b54e37e399d..543eb2ac84263 100644 --- a/src/test/ui/asm/asm-bad-clobber.rs +++ b/src/test/ui/asm/asm-bad-clobber.rs @@ -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 diff --git a/src/test/ui/asm/asm-misplaced-option.rs b/src/test/ui/asm/asm-misplaced-option.rs index bfc1fd68fe07b..bb75fbc5bc4ca 100644 --- a/src/test/ui/asm/asm-misplaced-option.rs +++ b/src/test/ui/asm/asm-misplaced-option.rs @@ -21,14 +21,14 @@ // ignore-mips // ignore-mips64 -#![feature(asm, rustc_attrs)] - +// compile-pass +// skip-codegen +#![feature(asm)] #![allow(dead_code, non_upper_case_globals)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -#[rustc_error] -pub fn main() { //~ ERROR compilation successful +pub fn main() { // assignment not dead let mut x: isize = 0; unsafe { diff --git a/src/test/ui/asm/asm-misplaced-option.stderr b/src/test/ui/asm/asm-misplaced-option.stderr index 46723918a3afe..589fd47cc1ed5 100644 --- a/src/test/ui/asm/asm-misplaced-option.stderr +++ b/src/test/ui/asm/asm-misplaced-option.stderr @@ -10,17 +10,3 @@ warning: expected a clobber, found an option LL | asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile"); | ^^^^^^^^^^ -error: compilation successful - --> $DIR/asm-misplaced-option.rs:31:1 - | -LL | / pub fn main() { //~ ERROR compilation successful -LL | | // assignment not dead -LL | | let mut x: isize = 0; -LL | | unsafe { -... | -LL | | assert_eq!(x, 13); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/associated-types/cache/chrono-scan.rs b/src/test/ui/associated-types/cache/chrono-scan.rs index a753527ea53d5..c4b8164522c0e 100644 --- a/src/test/ui/associated-types/cache/chrono-scan.rs +++ b/src/test/ui/associated-types/cache/chrono-scan.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] - pub type ParseResult = Result; pub enum Item<'a> { Literal(&'a str), @@ -35,5 +35,5 @@ pub fn parse<'a, I>(mut s: &str, items: I) -> ParseResult<()> Ok(()) } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/associated-types/cache/chrono-scan.stderr b/src/test/ui/associated-types/cache/chrono-scan.stderr deleted file mode 100644 index 99281e745656d..0000000000000 --- a/src/test/ui/associated-types/cache/chrono-scan.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/chrono-scan.rs:39:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/associated-types/cache/elision.rs b/src/test/ui/associated-types/cache/elision.rs index d1117328c8657..01bf25ba9937f 100644 --- a/src/test/ui/associated-types/cache/elision.rs +++ b/src/test/ui/associated-types/cache/elision.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] - // Check that you are allowed to implement using elision but write // trait without elision (a bug in this cropped up during // bootstrapping, so this is a regression test). @@ -30,5 +30,5 @@ impl UnicodeStr for str { } } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/associated-types/cache/elision.stderr b/src/test/ui/associated-types/cache/elision.stderr deleted file mode 100644 index c5314b58002c0..0000000000000 --- a/src/test/ui/associated-types/cache/elision.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/elision.rs:34:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/bad/bad-lint-cap3.rs b/src/test/ui/bad/bad-lint-cap3.rs index c9394954c5fbd..1a8c18db8968a 100644 --- a/src/test/ui/bad/bad-lint-cap3.rs +++ b/src/test/ui/bad/bad-lint-cap3.rs @@ -12,10 +12,10 @@ #![warn(unused)] #![deny(warnings)] -#![feature(rustc_attrs)] - +// compile-pass +// skip-codegen use std::option; //~ WARN -#[rustc_error] -fn main() {} //~ ERROR: compilation successful + +fn main() {} diff --git a/src/test/ui/bad/bad-lint-cap3.stderr b/src/test/ui/bad/bad-lint-cap3.stderr index d32246073146f..aa455c51932e0 100644 --- a/src/test/ui/bad/bad-lint-cap3.stderr +++ b/src/test/ui/bad/bad-lint-cap3.stderr @@ -11,11 +11,3 @@ LL | #![deny(warnings)] | ^^^^^^^^ = note: #[warn(unused_imports)] implied by #[warn(warnings)] -error: compilation successful - --> $DIR/bad-lint-cap3.rs:20:1 - | -LL | fn main() {} //~ ERROR: compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/coherence/coherence-projection-ok-orphan.rs b/src/test/ui/coherence/coherence-projection-ok-orphan.rs index a52af0873a823..1ce455123aa75 100644 --- a/src/test/ui/coherence/coherence-projection-ok-orphan.rs +++ b/src/test/ui/coherence/coherence-projection-ok-orphan.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(dead_code)] - // Here we do not get a coherence conflict because `Baz: Iterator` // does not hold and (due to the orphan rules), we can rely on that. @@ -25,5 +25,5 @@ impl Foo for Baz { } impl Foo for A { } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/coherence/coherence-projection-ok-orphan.stderr b/src/test/ui/coherence/coherence-projection-ok-orphan.stderr deleted file mode 100644 index 1b9a32525bfac..0000000000000 --- a/src/test/ui/coherence/coherence-projection-ok-orphan.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/coherence-projection-ok-orphan.rs:29:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/coherence/coherence-projection-ok.rs b/src/test/ui/coherence/coherence-projection-ok.rs index af88f3744eaeb..dfb2ef0a2baa3 100644 --- a/src/test/ui/coherence/coherence-projection-ok.rs +++ b/src/test/ui/coherence/coherence-projection-ok.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] - +// compile-pass +// skip-codegen pub trait Foo

{} pub trait Bar { @@ -24,5 +24,5 @@ impl Bar for i32 { type Output = u32; } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/coherence/coherence-projection-ok.stderr b/src/test/ui/coherence/coherence-projection-ok.stderr deleted file mode 100644 index 945f3b396b7b2..0000000000000 --- a/src/test/ui/coherence/coherence-projection-ok.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/coherence-projection-ok.rs:28:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs index 9fbb7aa4cb1a7..7d41fc1fb63c4 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs @@ -12,8 +12,8 @@ // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs - -#![feature(rustc_attrs)] +// compile-pass +// skip-codgen #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; @@ -30,5 +30,5 @@ impl MyTrait for T { } // Huzzah. impl MyTrait for lib::MyFundamentalStruct { } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.stderr b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.stderr deleted file mode 100644 index 675dc1b7004d8..0000000000000 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/coherence_copy_like_err_fundamental_struct.rs:34:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs index 2f6dca4f3c271..15acf1a99af23 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs @@ -12,8 +12,8 @@ // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs - -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; @@ -30,5 +30,5 @@ impl MyTrait for T { } // Huzzah. impl<'a> MyTrait for lib::MyFundamentalStruct<&'a MyType> { } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.stderr b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.stderr deleted file mode 100644 index 5143d4e874b09..0000000000000 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/coherence_copy_like_err_fundamental_struct_ref.rs:34:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs index f424e8872010f..ee6a61dca4add 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs @@ -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 MyTrait for T { } // Tuples are not fundamental. impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } //~ ERROR E0119 -#[rustc_error] + fn main() { } diff --git a/src/test/ui/coherence/coherence_local.rs b/src/test/ui/coherence/coherence_local.rs index 551577b6b4e08..7124c05036ce9 100644 --- a/src/test/ui/coherence/coherence_local.rs +++ b/src/test/ui/coherence/coherence_local.rs @@ -12,8 +12,8 @@ // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs - -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; @@ -29,5 +29,5 @@ impl lib::MyCopy for Box { } impl lib::MyCopy for lib::MyFundamentalStruct { } impl lib::MyCopy for lib::MyFundamentalStruct> { } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/coherence/coherence_local.stderr b/src/test/ui/coherence/coherence_local.stderr deleted file mode 100644 index c4340e8d87686..0000000000000 --- a/src/test/ui/coherence/coherence_local.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/coherence_local.rs:33:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/coherence/coherence_local_err_struct.rs b/src/test/ui/coherence/coherence_local_err_struct.rs index 01f4c1cd8a5c9..72772a6efbd12 100644 --- a/src/test/ui/coherence/coherence_local_err_struct.rs +++ b/src/test/ui/coherence/coherence_local_err_struct.rs @@ -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 { } //~ ERROR E0117 -#[rustc_error] + fn main() { } diff --git a/src/test/ui/coherence/coherence_local_err_tuple.rs b/src/test/ui/coherence/coherence_local_err_tuple.rs index 590f68cee59ef..88e98c7ce0011 100644 --- a/src/test/ui/coherence/coherence_local_err_tuple.rs +++ b/src/test/ui/coherence/coherence_local_err_tuple.rs @@ -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() { } diff --git a/src/test/ui/coherence/coherence_local_ref.rs b/src/test/ui/coherence/coherence_local_ref.rs index f6e1aab59766a..de26433012d90 100644 --- a/src/test/ui/coherence/coherence_local_ref.rs +++ b/src/test/ui/coherence/coherence_local_ref.rs @@ -12,8 +12,8 @@ // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs - -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; @@ -23,5 +23,5 @@ struct MyType { x: i32 } // naturally, legal impl lib::MyCopy for MyType { } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/coherence/coherence_local_ref.stderr b/src/test/ui/coherence/coherence_local_ref.stderr deleted file mode 100644 index 13d6fdd80f8a1..0000000000000 --- a/src/test/ui/coherence/coherence_local_ref.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/coherence_local_ref.rs:27:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/conditional-compilation/cfg_attr_path.rs b/src/test/ui/conditional-compilation/cfg_attr_path.rs index 7d799850a651e..b2805d76d8f6b 100644 --- a/src/test/ui/conditional-compilation/cfg_attr_path.rs +++ b/src/test/ui/conditional-compilation/cfg_attr_path.rs @@ -8,17 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(dead_code)] #![deny(unused_attributes)] // c.f #35584 - mod auxiliary { #[cfg_attr(any(), path = "nonexistent_file.rs")] pub mod namespaced_enums; #[cfg_attr(all(), path = "namespaced_enums.rs")] pub mod nonexistent_file; } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let _ = auxiliary::namespaced_enums::Foo::A; let _ = auxiliary::nonexistent_file::Foo::A; } diff --git a/src/test/ui/conditional-compilation/cfg_attr_path.stderr b/src/test/ui/conditional-compilation/cfg_attr_path.stderr deleted file mode 100644 index 67e59d054d5c1..0000000000000 --- a/src/test/ui/conditional-compilation/cfg_attr_path.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: compilation successful - --> $DIR/cfg_attr_path.rs:21:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let _ = auxiliary::namespaced_enums::Foo::A; -LL | | let _ = auxiliary::nonexistent_file::Foo::A; -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/consts/const-fn-stability-calls-3.rs b/src/test/ui/consts/const-fn-stability-calls-3.rs index 0f413b0bbc112..031576dd30830 100644 --- a/src/test/ui/consts/const-fn-stability-calls-3.rs +++ b/src/test/ui/consts/const-fn-stability-calls-3.rs @@ -10,16 +10,16 @@ // Test use of const fn from another crate without a feature gate. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(unused_variables)] - // aux-build:const_fn_lib.rs extern crate const_fn_lib; use const_fn_lib::foo; -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let x = foo(); // use outside a constant is ok } diff --git a/src/test/ui/consts/const-fn-stability-calls-3.stderr b/src/test/ui/consts/const-fn-stability-calls-3.stderr deleted file mode 100644 index 50c959d68053c..0000000000000 --- a/src/test/ui/consts/const-fn-stability-calls-3.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: compilation successful - --> $DIR/const-fn-stability-calls-3.rs:23:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let x = foo(); // use outside a constant is ok -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/expanded-cfg.rs b/src/test/ui/expanded-cfg.rs index 77351f6e4f171..9fd9f7b85af44 100644 --- a/src/test/ui/expanded-cfg.rs +++ b/src/test/ui/expanded-cfg.rs @@ -7,9 +7,9 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(custom_attribute, rustc_attrs)] - +// skip-codegen +// compile-pass +#![feature(custom_attribute)] macro_rules! mac { {} => { #[cfg(attr)] @@ -28,5 +28,5 @@ macro_rules! mac { mac! {} -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/expanded-cfg.stderr b/src/test/ui/expanded-cfg.stderr deleted file mode 100644 index d7bc47fad276f..0000000000000 --- a/src/test/ui/expanded-cfg.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/expanded-cfg.rs:32:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs index bbddbb7d679a8..3f340145acffe 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs @@ -40,7 +40,7 @@ // inputs are handled by each, and (2.) to ease searching for related // occurrences in the source text. -#![feature(rustc_attrs)] // For `rustc_error`; see note below. +// skip-codegen #![warn(unused_attributes, unknown_lints)] #![allow(dead_code)] #![allow(stable_features)] @@ -584,7 +584,7 @@ mod export_name { #[export_name = "2200"] impl S { } } -// Note that this test ends with a `#[rustc_error] fn main()`, so it +// Note that this test has a `skip-codegen`, so it // will never invoke the linker. These are here nonetheless to point // out that we allow them at non-crate-level (though I do not know // whether they have the same effect here as at crate-level). @@ -835,12 +835,12 @@ mod type_length_limit { //~| WARN crate-level attribute should be an inner attribute } -// Since we expect for the mix of attributes used here to compile -// successfully, and we are just testing for the expected warnings of -// various (mis)uses of attributes, we use the `rustc_error` attribute -// on the `fn main()`. -#[rustc_error] -fn main() { //~ ERROR compilation successful + + + + + +fn main() { println!("Hello World"); } diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr index 3b31b411f3f56..59e327bc1ba62 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr @@ -1303,13 +1303,7 @@ warning: unused attribute LL | #![proc_macro_derive = "2500"] //~ WARN unused attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: compilation successful - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:844:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | println!("Hello World"); -LL | | } - | |_^ +error: invalid windows subsystem `1000`, only `windows` and `console` are allowed error: aborting due to previous error diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs index 98da43c3a2252..3f423a415cfb8 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs +++ b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs @@ -15,9 +15,9 @@ // // (For non-crate-level cases, see issue-43106-gating-of-builtin-attrs.rs) -#![feature(rustc_attrs)] // For `rustc_error`; see note below. +// compile-pass +// skip-codegen #![allow(dead_code)] - #![deprecated = "1100"] // Since we expect for the mix of attributes used here to compile @@ -25,7 +25,7 @@ // various (mis)uses of attributes, we use the `rustc_error` attribute // on the `fn main()`. -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { println!("Hello World"); } diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr deleted file mode 100644 index 802c5d9384d75..0000000000000 --- a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: compilation successful - --> $DIR/issue-43106-gating-of-deprecated.rs:29:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | println!("Hello World"); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/feature-gates/feature-gate-custom_attribute.rs b/src/test/ui/feature-gates/feature-gate-custom_attribute.rs index ed8392ad7a3d1..4371de57776df 100644 --- a/src/test/ui/feature-gates/feature-gate-custom_attribute.rs +++ b/src/test/ui/feature-gates/feature-gate-custom_attribute.rs @@ -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() { } diff --git a/src/test/ui/glob-cycles.rs b/src/test/ui/glob-cycles.rs index 8f1b8ec91db38..d57dad074b27b 100644 --- a/src/test/ui/glob-cycles.rs +++ b/src/test/ui/glob-cycles.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] - +// compile-pass +// skip-codegen mod foo { pub use bar::*; pub use main as f; @@ -25,5 +25,5 @@ mod baz { pub use super::*; } -#[rustc_error] -pub fn main() {} //~ ERROR compilation successful + +pub fn main() {} diff --git a/src/test/ui/glob-cycles.stderr b/src/test/ui/glob-cycles.stderr deleted file mode 100644 index a9fd9306e2140..0000000000000 --- a/src/test/ui/glob-cycles.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/glob-cycles.rs:29:1 - | -LL | pub fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/hygiene/assoc_ty_bindings.rs b/src/test/ui/hygiene/assoc_ty_bindings.rs index 46a138749ff17..bdf591ba7ab54 100644 --- a/src/test/ui/hygiene/assoc_ty_bindings.rs +++ b/src/test/ui/hygiene/assoc_ty_bindings.rs @@ -11,8 +11,8 @@ // ignore-pretty pretty-printing is unhygienic #![feature(decl_macro, associated_type_defaults)] -#![feature(rustc_attrs)] - +// compile-pass +// skip-codegen trait Base { type AssocTy; fn f(); @@ -45,5 +45,5 @@ macro mac() { mac!(); -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/hygiene/assoc_ty_bindings.stderr b/src/test/ui/hygiene/assoc_ty_bindings.stderr deleted file mode 100644 index 0adf80994f7fc..0000000000000 --- a/src/test/ui/hygiene/assoc_ty_bindings.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/assoc_ty_bindings.rs:49:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/if/if-loop.rs b/src/test/ui/if/if-loop.rs index 15f04df693981..a52bb7f8a288a 100644 --- a/src/test/ui/if/if-loop.rs +++ b/src/test/ui/if/if-loop.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] - // This used to ICE because the "if" being unreachable was not handled correctly fn err() { if loop {} {} } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/if/if-loop.stderr b/src/test/ui/if/if-loop.stderr deleted file mode 100644 index 6862560570d73..0000000000000 --- a/src/test/ui/if/if-loop.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/if-loop.rs:20:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/imports/import-crate-var.rs b/src/test/ui/imports/import-crate-var.rs index b09883d9adeea..663e1379b40b1 100644 --- a/src/test/ui/imports/import-crate-var.rs +++ b/src/test/ui/imports/import-crate-var.rs @@ -10,12 +10,12 @@ // aux-build:import_crate_var.rs -#![feature(rustc_attrs)] - +// compile-pass +// skip-codegen #[macro_use] extern crate import_crate_var; -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { m!(); //~^ WARN `$crate` may not be imported //~| NOTE `use $crate;` was erroneously allowed and will become a hard error diff --git a/src/test/ui/imports/import-crate-var.stderr b/src/test/ui/imports/import-crate-var.stderr index 3f02223fb67a4..ce4ffe796f303 100644 --- a/src/test/ui/imports/import-crate-var.stderr +++ b/src/test/ui/imports/import-crate-var.stderr @@ -7,15 +7,3 @@ LL | m!(); = note: `use $crate;` was erroneously allowed and will become a hard error in a future release = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) -error: compilation successful - --> $DIR/import-crate-var.rs:18:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | m!(); -LL | | //~^ WARN `$crate` may not be imported -LL | | //~| NOTE `use $crate;` was erroneously allowed and will become a hard error -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-11740.rs b/src/test/ui/issues/issue-11740.rs index 0bda06be9e8ca..b41d81f332c79 100644 --- a/src/test/ui/issues/issue-11740.rs +++ b/src/test/ui/issues/issue-11740.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] - struct Attr { name: String, value: String, @@ -31,8 +31,8 @@ impl Element { } } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let element = Element { attrs: Vec::new() }; let _ = unsafe { element.get_attr("foo") }; } diff --git a/src/test/ui/issues/issue-11740.stderr b/src/test/ui/issues/issue-11740.stderr deleted file mode 100644 index a1913e0057ca7..0000000000000 --- a/src/test/ui/issues/issue-11740.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: compilation successful - --> $DIR/issue-11740.rs:35:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let element = Element { attrs: Vec::new() }; -LL | | let _ = unsafe { element.get_attr("foo") }; -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-16994.rs b/src/test/ui/issues/issue-16994.rs index ae4e8ce1df8ff..d1d129c918a7c 100644 --- a/src/test/ui/issues/issue-16994.rs +++ b/src/test/ui/issues/issue-16994.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] - +// compile-pass +// skip-codegen fn cb<'a,T>(_x: Box, bool))) -> T>) -> T { panic!() } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { cb(Box::new(|(k, &(ref v, b))| (*k, v.clone(), b))); } diff --git a/src/test/ui/issues/issue-16994.stderr b/src/test/ui/issues/issue-16994.stderr deleted file mode 100644 index 8392b9da4118b..0000000000000 --- a/src/test/ui/issues/issue-16994.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: compilation successful - --> $DIR/issue-16994.rs:18:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | cb(Box::new(|(k, &(ref v, b))| (*k, v.clone(), b))); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-19601.rs b/src/test/ui/issues/issue-19601.rs index 02b4932cea8c9..d76ded9e679a6 100644 --- a/src/test/ui/issues/issue-19601.rs +++ b/src/test/ui/issues/issue-19601.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] - trait A {} struct B where B: A> { t: T } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/issues/issue-19601.stderr b/src/test/ui/issues/issue-19601.stderr deleted file mode 100644 index 594d76605fe90..0000000000000 --- a/src/test/ui/issues/issue-19601.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error: compilation successful - --> $DIR/issue-19601.rs:18:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-22603.rs b/src/test/ui/issues/issue-22603.rs index d08f916b870c1..271230ee4279e 100644 --- a/src/test/ui/issues/issue-22603.rs +++ b/src/test/ui/issues/issue-22603.rs @@ -7,9 +7,9 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(unboxed_closures, fn_traits, rustc_attrs)] - +// skip-codegen +// compile-pass +#![feature(unboxed_closures, fn_traits)] struct Foo; impl FnOnce<(A,)> for Foo { @@ -17,7 +17,7 @@ impl FnOnce<(A,)> for Foo { extern "rust-call" fn call_once(self, (_,): (A,)) { } } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { println!("{:?}", Foo("bar")); } diff --git a/src/test/ui/issues/issue-22603.stderr b/src/test/ui/issues/issue-22603.stderr deleted file mode 100644 index b50a5a25a7a46..0000000000000 --- a/src/test/ui/issues/issue-22603.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: compilation successful - --> $DIR/issue-22603.rs:21:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | println!("{:?}", Foo("bar")); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-22789.rs b/src/test/ui/issues/issue-22789.rs index cba1c367bb9b2..9b4c9eb2d43e0 100644 --- a/src/test/ui/issues/issue-22789.rs +++ b/src/test/ui/issues/issue-22789.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(unboxed_closures, fn_traits, rustc_attrs)] - -#[rustc_error] -fn main() { //~ ERROR compilation successful +// compile-pass +// skip-codegen +#![feature(unboxed_closures, fn_traits)] +fn main() { let k = |x: i32| { x + 1 }; Fn::call(&k, (0,)); } diff --git a/src/test/ui/issues/issue-22789.stderr b/src/test/ui/issues/issue-22789.stderr deleted file mode 100644 index afeae9c78efb8..0000000000000 --- a/src/test/ui/issues/issue-22789.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: compilation successful - --> $DIR/issue-22789.rs:14:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let k = |x: i32| { x + 1 }; -LL | | Fn::call(&k, (0,)); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-22933-1.rs b/src/test/ui/issues/issue-22933-1.rs index afb972faaca0e..41bd5d7188fbf 100644 --- a/src/test/ui/issues/issue-22933-1.rs +++ b/src/test/ui/issues/issue-22933-1.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] - struct CNFParser { token: char, } @@ -31,5 +31,5 @@ impl CNFParser { } } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-22933-1.stderr b/src/test/ui/issues/issue-22933-1.stderr deleted file mode 100644 index eaebebe3b111a..0000000000000 --- a/src/test/ui/issues/issue-22933-1.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-22933-1.rs:35:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-24883.rs b/src/test/ui/issues/issue-24883.rs index 097f2a5630cfa..f047d6e7fffd0 100644 --- a/src/test/ui/issues/issue-24883.rs +++ b/src/test/ui/issues/issue-24883.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] - +// compile-pass +// skip-codegen mod a { pub mod b { pub struct Foo; } @@ -21,8 +21,8 @@ mod a { pub use self::c::*; } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let _ = a::c::Bar(a::b::Foo); let _ = a::Bar(a::b::Foo); } diff --git a/src/test/ui/issues/issue-24883.stderr b/src/test/ui/issues/issue-24883.stderr deleted file mode 100644 index 4b17747f10908..0000000000000 --- a/src/test/ui/issues/issue-24883.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: compilation successful - --> $DIR/issue-24883.rs:25:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let _ = a::c::Bar(a::b::Foo); -LL | | let _ = a::Bar(a::b::Foo); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-26614.rs b/src/test/ui/issues/issue-26614.rs index c128fb3b47959..c930f26acf4c6 100644 --- a/src/test/ui/issues/issue-26614.rs +++ b/src/test/ui/issues/issue-26614.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] - trait Mirror { type It; } @@ -20,8 +20,8 @@ impl Mirror for T { } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let c: ::It = 5; const CCCC: ::It = 5; } diff --git a/src/test/ui/issues/issue-26614.stderr b/src/test/ui/issues/issue-26614.stderr deleted file mode 100644 index 1752d80fde367..0000000000000 --- a/src/test/ui/issues/issue-26614.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: compilation successful - --> $DIR/issue-26614.rs:24:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let c: ::It = 5; -LL | | const CCCC: ::It = 5; -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-26930.rs b/src/test/ui/issues/issue-26930.rs index 6c98f3e856023..9751dae26be05 100644 --- a/src/test/ui/issues/issue-26930.rs +++ b/src/test/ui/issues/issue-26930.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(unused)] - extern crate core; use core as core_export; use self::x::*; mod x {} -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-26930.stderr b/src/test/ui/issues/issue-26930.stderr deleted file mode 100644 index f962f4c58c444..0000000000000 --- a/src/test/ui/issues/issue-26930.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-26930.rs:20:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-29857.rs b/src/test/ui/issues/issue-29857.rs index 661579f52b684..be28bf0d272ce 100644 --- a/src/test/ui/issues/issue-29857.rs +++ b/src/test/ui/issues/issue-29857.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen use std::marker::PhantomData; @@ -27,5 +27,5 @@ pub trait Bar { impl> Foo<*mut T> for W {} -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-29857.stderr b/src/test/ui/issues/issue-29857.stderr deleted file mode 100644 index d5ba942b19f26..0000000000000 --- a/src/test/ui/issues/issue-29857.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-29857.rs:31:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-31924-non-snake-ffi.rs b/src/test/ui/issues/issue-31924-non-snake-ffi.rs index d9ce1159c0ece..f869c89b79cfd 100644 --- a/src/test/ui/issues/issue-31924-non-snake-ffi.rs +++ b/src/test/ui/issues/issue-31924-non-snake-ffi.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![deny(non_snake_case)] - #[no_mangle] pub extern "C" fn SparklingGenerationForeignFunctionInterface() {} -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-31924-non-snake-ffi.stderr b/src/test/ui/issues/issue-31924-non-snake-ffi.stderr deleted file mode 100644 index 2aaaa1578a581..0000000000000 --- a/src/test/ui/issues/issue-31924-non-snake-ffi.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-31924-non-snake-ffi.rs:18:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-32119.rs b/src/test/ui/issues/issue-32119.rs index e630a01a59300..f96f1ae69214b 100644 --- a/src/test/ui/issues/issue-32119.rs +++ b/src/test/ui/issues/issue-32119.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(dead_code)] - pub type T = (); mod foo { pub use super::T; } mod bar { pub use super::T; } @@ -25,5 +25,5 @@ mod baz { pub use self::bar::*; } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-32119.stderr b/src/test/ui/issues/issue-32119.stderr deleted file mode 100644 index 04276ec1ffd06..0000000000000 --- a/src/test/ui/issues/issue-32119.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-32119.rs:29:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-32222.rs b/src/test/ui/issues/issue-32222.rs index b3b34f4b0efda..c4e8450fabc17 100644 --- a/src/test/ui/issues/issue-32222.rs +++ b/src/test/ui/issues/issue-32222.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] mod foo { @@ -30,5 +31,5 @@ mod b { pub use a::bar; } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-32222.stderr b/src/test/ui/issues/issue-32222.stderr deleted file mode 100644 index ba2c5396e4d8c..0000000000000 --- a/src/test/ui/issues/issue-32222.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-32222.rs:34:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-32797.rs b/src/test/ui/issues/issue-32797.rs index 2c54ed3e857e9..1061ffe11e1c4 100644 --- a/src/test/ui/issues/issue-32797.rs +++ b/src/test/ui/issues/issue-32797.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen pub use bar::*; mod bar { @@ -20,5 +21,5 @@ mod baz { pub use main as f; } -#[rustc_error] -pub fn main() {} //~ ERROR compilation successful + +pub fn main() {} diff --git a/src/test/ui/issues/issue-32797.stderr b/src/test/ui/issues/issue-32797.stderr deleted file mode 100644 index 8e1430e505df9..0000000000000 --- a/src/test/ui/issues/issue-32797.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-32797.rs:24:1 - | -LL | pub fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-32922.rs b/src/test/ui/issues/issue-32922.rs index 317a47156c1ac..c0b14da9b2cd1 100644 --- a/src/test/ui/issues/issue-32922.rs +++ b/src/test/ui/issues/issue-32922.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] macro_rules! foo { () => { @@ -31,8 +32,8 @@ macro_rules! baz { } } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { foo! {}; bar! {}; diff --git a/src/test/ui/issues/issue-32922.stderr b/src/test/ui/issues/issue-32922.stderr deleted file mode 100644 index c1e80b0eb78b8..0000000000000 --- a/src/test/ui/issues/issue-32922.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: compilation successful - --> $DIR/issue-32922.rs:35:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | foo! {}; -LL | | bar! {}; -LL | | -LL | | let mut a = true; -LL | | baz!(a); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-33241.rs b/src/test/ui/issues/issue-33241.rs index 6a411b4c59c68..858c9f4ae3f35 100644 --- a/src/test/ui/issues/issue-33241.rs +++ b/src/test/ui/issues/issue-33241.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen use std::fmt; @@ -16,8 +17,8 @@ use std::fmt; // an unsized tuple by transmuting a trait object. fn any() -> T { unreachable!() } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let t: &(u8, fmt::Debug) = any(); println!("{:?}", &t.1); } diff --git a/src/test/ui/issues/issue-33241.stderr b/src/test/ui/issues/issue-33241.stderr deleted file mode 100644 index 1b6577dc41f06..0000000000000 --- a/src/test/ui/issues/issue-33241.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: compilation successful - --> $DIR/issue-33241.rs:20:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let t: &(u8, fmt::Debug) = any(); -LL | | println!("{:?}", &t.1); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-34028.rs b/src/test/ui/issues/issue-34028.rs index 117ab18a1158a..10ae2b8e6dc16 100644 --- a/src/test/ui/issues/issue-34028.rs +++ b/src/test/ui/issues/issue-34028.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen macro_rules! m { () => { #[cfg(any())] fn f() {} } @@ -17,5 +18,5 @@ macro_rules! m { trait T {} impl T for () { m!(); } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-34028.stderr b/src/test/ui/issues/issue-34028.stderr deleted file mode 100644 index b715fa84f6018..0000000000000 --- a/src/test/ui/issues/issue-34028.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-34028.rs:21:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-34171.rs b/src/test/ui/issues/issue-34171.rs index 30dd34ae9a029..55fec30cdde71 100644 --- a/src/test/ui/issues/issue-34171.rs +++ b/src/test/ui/issues/issue-34171.rs @@ -8,14 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen macro_rules! null { ($i:tt) => {} } macro_rules! apply_null { ($i:item) => { null! { $i } } } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { apply_null!(#[cfg(all())] fn f() {}); } diff --git a/src/test/ui/issues/issue-34171.stderr b/src/test/ui/issues/issue-34171.stderr deleted file mode 100644 index cb8cfbd8599ce..0000000000000 --- a/src/test/ui/issues/issue-34171.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: compilation successful - --> $DIR/issue-34171.rs:19:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | apply_null!(#[cfg(all())] fn f() {}); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-34418.rs b/src/test/ui/issues/issue-34418.rs index 6bc0add220517..394a85f8c8932 100644 --- a/src/test/ui/issues/issue-34418.rs +++ b/src/test/ui/issues/issue-34418.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(unused)] macro_rules! make_item { @@ -27,5 +28,5 @@ fn g() { make_stmt! {} } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-34418.stderr b/src/test/ui/issues/issue-34418.stderr deleted file mode 100644 index 4cb5ec1ae3b32..0000000000000 --- a/src/test/ui/issues/issue-34418.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-34418.rs:31:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-34839.rs b/src/test/ui/issues/issue-34839.rs index be7e782002048..8aad248dc50f5 100644 --- a/src/test/ui/issues/issue-34839.rs +++ b/src/test/ui/issues/issue-34839.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(dead_code)] trait RegularExpression: Sized { @@ -27,5 +28,5 @@ enum FindCapturesInner<'r, 't> { Dynamic(FindCaptures<'t, ExecNoSyncStr<'r>>), } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-34839.stderr b/src/test/ui/issues/issue-34839.stderr deleted file mode 100644 index 538cc7a581bd6..0000000000000 --- a/src/test/ui/issues/issue-34839.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-34839.rs:31:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-35570.rs b/src/test/ui/issues/issue-35570.rs index 092bf00ddd6a4..57ca2c73d8e47 100644 --- a/src/test/ui/issues/issue-35570.rs +++ b/src/test/ui/issues/issue-35570.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen use std::mem; @@ -34,7 +35,7 @@ fn foo<'a>(x: &'a ()) -> <() as Lifetime<'a>>::Out { fn takes_lifetime(_f: for<'a> fn(&'a ()) -> <() as Lifetime<'a>>::Out) { } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { takes_lifetime(foo); } diff --git a/src/test/ui/issues/issue-35570.stderr b/src/test/ui/issues/issue-35570.stderr deleted file mode 100644 index 349693f29d5fe..0000000000000 --- a/src/test/ui/issues/issue-35570.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: compilation successful - --> $DIR/issue-35570.rs:38:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | takes_lifetime(foo); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-36116.rs b/src/test/ui/issues/issue-36116.rs index 3afbfa61984b5..d16aa1acee09c 100644 --- a/src/test/ui/issues/issue-36116.rs +++ b/src/test/ui/issues/issue-36116.rs @@ -10,9 +10,9 @@ // Unnecessary path disambiguator is ok -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(unused)] - macro_rules! m { ($p: path) => { let _ = $p(0); @@ -33,5 +33,5 @@ fn f() { m!(S::); // OK, no warning } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-36116.stderr b/src/test/ui/issues/issue-36116.stderr index df69dcb0d92c6..5819ea78e2455 100644 --- a/src/test/ui/issues/issue-36116.stderr +++ b/src/test/ui/issues/issue-36116.stderr @@ -10,11 +10,3 @@ warning: unnecessary path disambiguator LL | let g: Foo:: = Foo { _a: 42 }; //~ WARN unnecessary path disambiguator | ^^ try removing `::` -error: compilation successful - --> $DIR/issue-36116.rs:37:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-36379.rs b/src/test/ui/issues/issue-36379.rs index b20765815e0b2..e2f8c00dfb9bd 100644 --- a/src/test/ui/issues/issue-36379.rs +++ b/src/test/ui/issues/issue-36379.rs @@ -8,9 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen fn _test() -> impl Default { } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/issues/issue-36379.stderr b/src/test/ui/issues/issue-36379.stderr deleted file mode 100644 index b06591f411e99..0000000000000 --- a/src/test/ui/issues/issue-36379.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-36379.rs:16:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-36839.rs b/src/test/ui/issues/issue-36839.rs index 3e34b25067279..9396b7ad1b1eb 100644 --- a/src/test/ui/issues/issue-36839.rs +++ b/src/test/ui/issues/issue-36839.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen pub trait Foo { type Bar; @@ -26,7 +27,7 @@ impl Broken for T { } } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let _m: &Broken = &(); } diff --git a/src/test/ui/issues/issue-36839.stderr b/src/test/ui/issues/issue-36839.stderr deleted file mode 100644 index dd78668801c58..0000000000000 --- a/src/test/ui/issues/issue-36839.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: compilation successful - --> $DIR/issue-36839.rs:30:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let _m: &Broken = &(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-37051.rs b/src/test/ui/issues/issue-37051.rs index ab08e1899a0ee..adbd0c4b7abe5 100644 --- a/src/test/ui/issues/issue-37051.rs +++ b/src/test/ui/issues/issue-37051.rs @@ -8,9 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs, associated_type_defaults)] +// compile-pass +// skip-codegen +#![feature(associated_type_defaults)] #![allow(warnings)] - trait State: Sized { type NextState: State = StateMachineEnded; fn execute(self) -> Option; @@ -24,6 +25,6 @@ impl State for StateMachineEnded { } } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/issues/issue-37051.stderr b/src/test/ui/issues/issue-37051.stderr deleted file mode 100644 index b0404088d4d8a..0000000000000 --- a/src/test/ui/issues/issue-37051.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error: compilation successful - --> $DIR/issue-37051.rs:28:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-37366.rs b/src/test/ui/issues/issue-37366.rs index 2a4808fb186bb..3486403f54a9f 100644 --- a/src/test/ui/issues/issue-37366.rs +++ b/src/test/ui/issues/issue-37366.rs @@ -9,8 +9,9 @@ // except according to those terms. // ignore-emscripten - -#![feature(rustc_attrs, asm)] +// compile-pass +// skip-codegen +#![feature(asm)] macro_rules! interrupt_handler { () => { @@ -21,6 +22,6 @@ macro_rules! interrupt_handler { } interrupt_handler!{} -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/issues/issue-37366.stderr b/src/test/ui/issues/issue-37366.stderr deleted file mode 100644 index 8667feccf9971..0000000000000 --- a/src/test/ui/issues/issue-37366.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error: compilation successful - --> $DIR/issue-37366.rs:25:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-37510.rs b/src/test/ui/issues/issue-37510.rs index 53c91f323d081..44fcc89983751 100644 --- a/src/test/ui/issues/issue-37510.rs +++ b/src/test/ui/issues/issue-37510.rs @@ -8,12 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen fn foo(_: &mut i32) -> bool { true } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let opt = Some(92); let mut x = 62; diff --git a/src/test/ui/issues/issue-37510.stderr b/src/test/ui/issues/issue-37510.stderr deleted file mode 100644 index 48db0d5e2023d..0000000000000 --- a/src/test/ui/issues/issue-37510.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: compilation successful - --> $DIR/issue-37510.rs:16:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let opt = Some(92); -LL | | let mut x = 62; -LL | | -... | -LL | | } -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-37515.rs b/src/test/ui/issues/issue-37515.rs index d5733f9819387..9ceefaf57b752 100644 --- a/src/test/ui/issues/issue-37515.rs +++ b/src/test/ui/issues/issue-37515.rs @@ -7,13 +7,13 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(rustc_attrs)] +// skip-codegen +// compile-pass #![warn(unused)] type Z = for<'x> Send; //~^ WARN type alias is never used -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/issues/issue-37515.stderr b/src/test/ui/issues/issue-37515.stderr index 68e983f23b034..3a6e35bb12e04 100644 --- a/src/test/ui/issues/issue-37515.stderr +++ b/src/test/ui/issues/issue-37515.stderr @@ -11,12 +11,3 @@ LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] -error: compilation successful - --> $DIR/issue-37515.rs:18:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-38160.rs b/src/test/ui/issues/issue-38160.rs index 311d0ceb4d37b..30552c03cde0e 100644 --- a/src/test/ui/issues/issue-38160.rs +++ b/src/test/ui/issues/issue-38160.rs @@ -8,9 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(associated_consts, rustc_attrs)] +// compile-pass +// skip-codegen +#![feature(associated_consts)] #![allow(warnings)] - trait MyTrait { const MY_CONST: &'static str; } @@ -27,5 +28,5 @@ macro_rules! my_macro { my_macro!(); -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-38160.stderr b/src/test/ui/issues/issue-38160.stderr deleted file mode 100644 index 1277d84a0320c..0000000000000 --- a/src/test/ui/issues/issue-38160.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-38160.rs:31:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-38381.rs b/src/test/ui/issues/issue-38381.rs index 6b7dde117dfd6..b0b79c1f49d3e 100644 --- a/src/test/ui/issues/issue-38381.rs +++ b/src/test/ui/issues/issue-38381.rs @@ -8,11 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen use std::ops::Deref; -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let _x: fn(&i32) -> <&i32 as Deref>::Target = unimplemented!(); } diff --git a/src/test/ui/issues/issue-38381.stderr b/src/test/ui/issues/issue-38381.stderr deleted file mode 100644 index baa6338a37ead..0000000000000 --- a/src/test/ui/issues/issue-38381.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: compilation successful - --> $DIR/issue-38381.rs:16:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let _x: fn(&i32) -> <&i32 as Deref>::Target = unimplemented!(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-40350.rs b/src/test/ui/issues/issue-40350.rs index 39249ee4718b1..0d4ba99c45f0e 100644 --- a/src/test/ui/issues/issue-40350.rs +++ b/src/test/ui/issues/issue-40350.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass +// skip-codegen #![allow(warnings)] enum E { @@ -18,7 +19,5 @@ enum E { } } -#[rustc_error] -fn main() {} -//~^ ERROR compilation successful +fn main() {} diff --git a/src/test/ui/issues/issue-40350.stderr b/src/test/ui/issues/issue-40350.stderr deleted file mode 100644 index ad85bf2a77814..0000000000000 --- a/src/test/ui/issues/issue-40350.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-40350.rs:22:1 - | -LL | fn main() {} - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-40510-1.nll.stderr b/src/test/ui/issues/issue-40510-1.nll.stderr index ee8fdc16a06f4..723b6f3111c62 100644 --- a/src/test/ui/issues/issue-40510-1.nll.stderr +++ b/src/test/ui/issues/issue-40510-1.nll.stderr @@ -12,11 +12,3 @@ LL | &mut x It represents potential unsoundness in your code. This warning will become a hard error in the future. -error: compilation successful - --> $DIR/issue-40510-1.rs:23:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-40510-1.rs b/src/test/ui/issues/issue-40510-1.rs index 142092ff41eb3..b053f8e7d807a 100644 --- a/src/test/ui/issues/issue-40510-1.rs +++ b/src/test/ui/issues/issue-40510-1.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass #![allow(unused)] fn f() { @@ -19,5 +19,5 @@ fn f() { }; } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-40510-1.stderr b/src/test/ui/issues/issue-40510-1.stderr deleted file mode 100644 index 1f5a41fce9688..0000000000000 --- a/src/test/ui/issues/issue-40510-1.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-40510-1.rs:23:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-40510-2.rs b/src/test/ui/issues/issue-40510-2.rs index 0fe5658482263..74c855476f2f5 100644 --- a/src/test/ui/issues/issue-40510-2.rs +++ b/src/test/ui/issues/issue-40510-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass #![allow(unused)] fn f() { @@ -19,5 +19,5 @@ fn f() { }; } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-40510-2.stderr b/src/test/ui/issues/issue-40510-2.stderr deleted file mode 100644 index 03998af50c2d3..0000000000000 --- a/src/test/ui/issues/issue-40510-2.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-40510-2.rs:23:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-40510-3.nll.stderr b/src/test/ui/issues/issue-40510-3.nll.stderr index 37a00746a88c2..e8e82ee8fdae2 100644 --- a/src/test/ui/issues/issue-40510-3.nll.stderr +++ b/src/test/ui/issues/issue-40510-3.nll.stderr @@ -14,11 +14,3 @@ LL | | } It represents potential unsoundness in your code. This warning will become a hard error in the future. -error: compilation successful - --> $DIR/issue-40510-3.rs:25:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-40510-3.rs b/src/test/ui/issues/issue-40510-3.rs index afa8f15ee570a..d4d1d28a1376a 100644 --- a/src/test/ui/issues/issue-40510-3.rs +++ b/src/test/ui/issues/issue-40510-3.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass #![allow(unused)] fn f() { @@ -21,5 +21,5 @@ fn f() { }; } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-40510-3.stderr b/src/test/ui/issues/issue-40510-3.stderr deleted file mode 100644 index c77b5cc830365..0000000000000 --- a/src/test/ui/issues/issue-40510-3.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-40510-3.rs:25:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-40510-4.rs b/src/test/ui/issues/issue-40510-4.rs index a39c500225b9b..6059f2b82c1b5 100644 --- a/src/test/ui/issues/issue-40510-4.rs +++ b/src/test/ui/issues/issue-40510-4.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass #![allow(unused)] fn f() { @@ -21,5 +21,5 @@ fn f() { }; } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/issues/issue-40510-4.stderr b/src/test/ui/issues/issue-40510-4.stderr deleted file mode 100644 index 1f3cd00fb483b..0000000000000 --- a/src/test/ui/issues/issue-40510-4.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/issue-40510-4.rs:25:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/issues/issue-41998.rs b/src/test/ui/issues/issue-41998.rs index 406aadcd2129d..57af617c5ff81 100644 --- a/src/test/ui/issues/issue-41998.rs +++ b/src/test/ui/issues/issue-41998.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { if ('x' as char) < ('y' as char) { print!("x"); } else { diff --git a/src/test/ui/issues/issue-41998.stderr b/src/test/ui/issues/issue-41998.stderr deleted file mode 100644 index e757c7f3a4463..0000000000000 --- a/src/test/ui/issues/issue-41998.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: compilation successful - --> $DIR/issue-41998.rs:14:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | if ('x' as char) < ('y' as char) { -LL | | print!("x"); -LL | | } else { -LL | | print!("y"); -LL | | } -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs index 7e9a4f82478bd..cd0ba5e4a0a59 100644 --- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs +++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs @@ -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) { lib::ref_obj(x) } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/lint/lint-output-format-2.rs b/src/test/ui/lint/lint-output-format-2.rs index e87ddde7413d2..d29019309abad 100644 --- a/src/test/ui/lint/lint-output-format-2.rs +++ b/src/test/ui/lint/lint-output-format-2.rs @@ -11,14 +11,14 @@ // aux-build:lint_output_format.rs #![feature(unstable_test_feature)] -#![feature(rustc_attrs)] +// compile-pass extern crate lint_output_format; use lint_output_format::{foo, bar}; //~^ WARNING use of deprecated item 'lint_output_format::foo': text -#[rustc_error] -fn main() { //~ ERROR: compilation successful + +fn main() { let _x = foo(); //~^ WARNING use of deprecated item 'lint_output_format::foo': text let _y = bar(); diff --git a/src/test/ui/lint/lint-output-format-2.stderr b/src/test/ui/lint/lint-output-format-2.stderr index 8c6247688e80c..a5718fd74b379 100644 --- a/src/test/ui/lint/lint-output-format-2.stderr +++ b/src/test/ui/lint/lint-output-format-2.stderr @@ -12,15 +12,3 @@ warning: use of deprecated item 'lint_output_format::foo': text LL | let _x = foo(); | ^^^ -error: compilation successful - --> $DIR/lint-output-format-2.rs:21:1 - | -LL | / fn main() { //~ ERROR: compilation successful -LL | | let _x = foo(); -LL | | //~^ WARNING use of deprecated item 'lint_output_format::foo': text -LL | | let _y = bar(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-stability-deprecated.rs b/src/test/ui/lint/lint-stability-deprecated.rs index de2c27bdcbcca..459eaa14737ac 100644 --- a/src/test/ui/lint/lint-stability-deprecated.rs +++ b/src/test/ui/lint/lint-stability-deprecated.rs @@ -8,15 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// compile-pass // aux-build:lint_stability.rs // aux-build:inherited_stability.rs // aux-build:stability_cfg1.rs // aux-build:stability_cfg2.rs // ignore-tidy-linelength - #![warn(deprecated)] #![allow(dead_code, unused_extern_crates)] -#![feature(staged_api, unstable_test_feature, rustc_attrs)] +#![feature(staged_api, unstable_test_feature)] #![stable(feature = "rust1", since = "1.0.0")] @@ -470,4 +470,4 @@ mod this_crate { trait LocalTrait : DeprecatedTrait { } //~ WARN use of deprecated item 'this_crate::DeprecatedTrait' } -#[rustc_error] fn main() {} //~ ERROR: compilation successful +fn main() {} diff --git a/src/test/ui/lint/lint-stability-deprecated.stderr b/src/test/ui/lint/lint-stability-deprecated.stderr index afebb4f36a4ad..a763a994a884b 100644 --- a/src/test/ui/lint/lint-stability-deprecated.stderr +++ b/src/test/ui/lint/lint-stability-deprecated.stderr @@ -634,11 +634,3 @@ warning: use of deprecated item 'this_crate::Trait::trait_deprecated_text': text LL | foo.trait_deprecated_text(); //~ WARN use of deprecated item 'this_crate::Trait::trait_deprecated_text': text | ^^^^^^^^^^^^^^^^^^^^^ -error: compilation successful - --> $DIR/lint-stability-deprecated.rs:473:16 - | -LL | #[rustc_error] fn main() {} //~ ERROR: compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-type-overflow2.rs b/src/test/ui/lint/lint-type-overflow2.rs index f7cf8a68d5684..82ec3be15969a 100644 --- a/src/test/ui/lint/lint-type-overflow2.rs +++ b/src/test/ui/lint/lint-type-overflow2.rs @@ -7,15 +7,15 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. -// +// compile-flags: -O #![warn(overflowing_literals)] #![warn(const_err)] -#![feature(rustc_attrs)] +// compile-pass #[allow(unused_variables)] -#[rustc_error] -fn main() { //~ ERROR: compilation successful + +fn main() { let x2: i8 = --128; //~ warn: literal out of range for i8 let x = -3.40282357e+38_f32; //~ warn: literal out of range for f32 diff --git a/src/test/ui/lint/lint-type-overflow2.stderr b/src/test/ui/lint/lint-type-overflow2.stderr index ecfd2584bba42..1fb63ac759579 100644 --- a/src/test/ui/lint/lint-type-overflow2.stderr +++ b/src/test/ui/lint/lint-type-overflow2.stderr @@ -34,17 +34,15 @@ warning: literal out of range for f64 LL | let x = 1.7976931348623159e+308_f64; //~ warn: literal out of range for f64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: compilation successful - --> $DIR/lint-type-overflow2.rs:18:1 - | -LL | / fn main() { //~ ERROR: compilation successful -LL | | let x2: i8 = --128; //~ warn: literal out of range for i8 -LL | | -LL | | let x = -3.40282357e+38_f32; //~ warn: literal out of range for f32 -... | -LL | | let x = 1.7976931348623159e+308_f64; //~ warn: literal out of range for f64 -LL | | } - | |_^ - -error: aborting due to previous error +warning: this expression will panic at runtime + --> $DIR/lint-type-overflow2.rs:19:18 + | +LL | let x2: i8 = --128; //~ warn: literal out of range for i8 + | ^^^^^ attempt to negate with overflow + | +note: lint level defined here + --> $DIR/lint-type-overflow2.rs:13:9 + | +LL | #![warn(const_err)] + | ^^^^^^^^^ diff --git a/src/test/ui/lint/lint-unknown-feature-default.rs b/src/test/ui/lint/lint-unknown-feature-default.rs index 5a0568f05e6e1..cfab640ad4e89 100644 --- a/src/test/ui/lint/lint-unknown-feature-default.rs +++ b/src/test/ui/lint/lint-unknown-feature-default.rs @@ -14,7 +14,7 @@ // FIXME(#44232) we should warn that this isn't used. #![feature(rust1)] -#![feature(rustc_attrs)] +// compile-pass -#[rustc_error] -fn main() { } //~ ERROR: compilation successful + +fn main() { } diff --git a/src/test/ui/lint/lint-unknown-feature-default.stderr b/src/test/ui/lint/lint-unknown-feature-default.stderr deleted file mode 100644 index bd4079ffd2e09..0000000000000 --- a/src/test/ui/lint/lint-unknown-feature-default.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/lint-unknown-feature-default.rs:20:1 - | -LL | fn main() { } //~ ERROR: compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-unknown-feature.rs b/src/test/ui/lint/lint-unknown-feature.rs index 81f99f9949284..7c5878e1729b9 100644 --- a/src/test/ui/lint/lint-unknown-feature.rs +++ b/src/test/ui/lint/lint-unknown-feature.rs @@ -14,7 +14,7 @@ // FIXME(#44232) we should warn that this isn't used. #![feature(rust1)] -#![feature(rustc_attrs)] +// compile-pass -#[rustc_error] -fn main() {} //~ ERROR: compilation successful + +fn main() {} diff --git a/src/test/ui/lint/lint-unknown-feature.stderr b/src/test/ui/lint/lint-unknown-feature.stderr deleted file mode 100644 index e2744c03872a4..0000000000000 --- a/src/test/ui/lint/lint-unknown-feature.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/lint-unknown-feature.rs:20:1 - | -LL | fn main() {} //~ ERROR: compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/loops/loops-reject-duplicate-labels-2.rs b/src/test/ui/loops/loops-reject-duplicate-labels-2.rs index b273e7a0c7c9e..42b4a72a46c11 100644 --- a/src/test/ui/loops/loops-reject-duplicate-labels-2.rs +++ b/src/test/ui/loops/loops-reject-duplicate-labels-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass // ignore-tidy-linelength @@ -39,7 +39,7 @@ pub fn foo() { //~^ WARN label name `'lt` shadows a label name that is already in scope } -#[rustc_error] -pub fn main() { //~ ERROR compilation successful + +pub fn main() { foo(); } diff --git a/src/test/ui/loops/loops-reject-duplicate-labels-2.stderr b/src/test/ui/loops/loops-reject-duplicate-labels-2.stderr index 41b4a850f1bfb..442f1918bd154 100644 --- a/src/test/ui/loops/loops-reject-duplicate-labels-2.stderr +++ b/src/test/ui/loops/loops-reject-duplicate-labels-2.stderr @@ -62,13 +62,3 @@ LL | { 'lt: loop { break; } } LL | { 'lt: while let Some(_) = None:: { break; } } | ^^^ lifetime 'lt already in scope -error: compilation successful - --> $DIR/loops-reject-duplicate-labels-2.rs:43:1 - | -LL | / pub fn main() { //~ ERROR compilation successful -LL | | foo(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/loops/loops-reject-duplicate-labels.rs b/src/test/ui/loops/loops-reject-duplicate-labels.rs index ad24f69871c85..63cb947b49b52 100644 --- a/src/test/ui/loops/loops-reject-duplicate-labels.rs +++ b/src/test/ui/loops/loops-reject-duplicate-labels.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass // ignore-tidy-linelength @@ -46,8 +46,8 @@ impl S { fn m2(&self) { 'okay: loop { break 'okay; } } } -#[rustc_error] -pub fn main() { //~ ERROR compilation successful + +pub fn main() { let s = S; s.m1(); s.m2(); diff --git a/src/test/ui/loops/loops-reject-duplicate-labels.stderr b/src/test/ui/loops/loops-reject-duplicate-labels.stderr index d0cb81544f828..7d556f4f227d4 100644 --- a/src/test/ui/loops/loops-reject-duplicate-labels.stderr +++ b/src/test/ui/loops/loops-reject-duplicate-labels.stderr @@ -62,16 +62,3 @@ LL | 'lt: loop { break; } LL | 'lt: while let Some(_) = None:: { break; } | ^^^ lifetime 'lt already in scope -error: compilation successful - --> $DIR/loops-reject-duplicate-labels.rs:50:1 - | -LL | / pub fn main() { //~ ERROR compilation successful -LL | | let s = S; -LL | | s.m1(); -LL | | s.m2(); -LL | | foo(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.rs b/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.rs index 74da125d575a0..56f8288fa2f2d 100644 --- a/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.rs +++ b/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.rs @@ -11,7 +11,7 @@ // Issue #21633: reject duplicate loop labels in function bodies. // This is testing interaction between lifetime-params and labels. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code, unused_variables)] @@ -113,7 +113,7 @@ fn foo() { } } -#[rustc_error] -pub fn main() { //~ ERROR compilation successful + +pub fn main() { foo(); } diff --git a/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.stderr b/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.stderr index af524d5b01766..d7d3cdb78e14a 100644 --- a/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.stderr +++ b/src/test/ui/loops/loops-reject-labels-shadowing-lifetimes.stderr @@ -100,13 +100,3 @@ LL | fn meth_bad<'bad>(&self) { LL | 'bad: loop { break 'bad; } | ^^^^ lifetime 'bad already in scope -error: compilation successful - --> $DIR/loops-reject-labels-shadowing-lifetimes.rs:117:1 - | -LL | / pub fn main() { //~ ERROR compilation successful -LL | | foo(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs index 077e57c9579e3..09b2c24e2a6a3 100644 --- a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs +++ b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code, unused_variables)] @@ -35,7 +35,7 @@ fn foo() { } } -#[rustc_error] -pub fn main() { //~ ERROR compilation successful + +pub fn main() { foo(); } diff --git a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.stderr b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.stderr index 999cfb9cc3c6b..ac5c59c044aae 100644 --- a/src/test/ui/loops/loops-reject-lifetime-shadowing-label.stderr +++ b/src/test/ui/loops/loops-reject-lifetime-shadowing-label.stderr @@ -6,13 +6,3 @@ LL | 'a: loop { LL | let b = Box::new(|x: &i8| *x) as Box Fn(&'a i8) -> i8>; | ^^ lifetime 'a already in scope -error: compilation successful - --> $DIR/loops-reject-lifetime-shadowing-label.rs:39:1 - | -LL | / pub fn main() { //~ ERROR compilation successful -LL | | foo(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/macros/macro-expanded-include/test.rs b/src/test/ui/macros/macro-expanded-include/test.rs index 4afb61ab76cf7..fa3737d6911ab 100644 --- a/src/test/ui/macros/macro-expanded-include/test.rs +++ b/src/test/ui/macros/macro-expanded-include/test.rs @@ -9,8 +9,8 @@ // except according to those terms. // ignore-emscripten no asm! support - -#![feature(asm, rustc_attrs)] +// compile-pass +#![feature(asm)] #![allow(unused)] #[macro_use] @@ -19,5 +19,5 @@ mod foo; m!(); fn f() { n!(); } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/macros/macro-expanded-include/test.stderr b/src/test/ui/macros/macro-expanded-include/test.stderr deleted file mode 100644 index 3ef0275cfbeec..0000000000000 --- a/src/test/ui/macros/macro-expanded-include/test.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/test.rs:23:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/macros/macro-stmt-matchers.rs b/src/test/ui/macros/macro-stmt-matchers.rs index 8f46d3301eb37..a1d77515f29d8 100644 --- a/src/test/ui/macros/macro-stmt-matchers.rs +++ b/src/test/ui/macros/macro-stmt-matchers.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { macro_rules! m { ($s:stmt;) => { $s } } m!(vec![].push(0);); } diff --git a/src/test/ui/macros/macro-stmt-matchers.stderr b/src/test/ui/macros/macro-stmt-matchers.stderr deleted file mode 100644 index ef6210bb6f7e8..0000000000000 --- a/src/test/ui/macros/macro-stmt-matchers.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: compilation successful - --> $DIR/macro-stmt-matchers.rs:14:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | macro_rules! m { ($s:stmt;) => { $s } } -LL | | m!(vec![].push(0);); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/macros/macro-tt-matchers.rs b/src/test/ui/macros/macro-tt-matchers.rs index 7255e7d00b611..90ac95d54d7d5 100644 --- a/src/test/ui/macros/macro-tt-matchers.rs +++ b/src/test/ui/macros/macro-tt-matchers.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] macro_rules! foo { @@ -17,5 +17,5 @@ macro_rules! foo { foo!(Box); -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/macros/macro-tt-matchers.stderr b/src/test/ui/macros/macro-tt-matchers.stderr deleted file mode 100644 index b7551c1bd93b1..0000000000000 --- a/src/test/ui/macros/macro-tt-matchers.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/macro-tt-matchers.rs:21:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/macros/macro-use-scope.rs b/src/test/ui/macros/macro-use-scope.rs index 9d389413ba9ad..b594085333bea 100644 --- a/src/test/ui/macros/macro-use-scope.rs +++ b/src/test/ui/macros/macro-use-scope.rs @@ -10,7 +10,7 @@ // aux-build:two_macros.rs -#![feature(rustc_attrs)] +// compile-pass #![allow(unused)] fn f() { @@ -28,5 +28,5 @@ macro_rules! m { () => { } } m!(); -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/macros/macro-use-scope.stderr b/src/test/ui/macros/macro-use-scope.stderr deleted file mode 100644 index 2e81750d43bbc..0000000000000 --- a/src/test/ui/macros/macro-use-scope.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/macro-use-scope.rs:32:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/maybe-bounds-where-cpass.rs b/src/test/ui/maybe-bounds-where-cpass.rs index f10526200ff14..8ba6863167b87 100644 --- a/src/test/ui/maybe-bounds-where-cpass.rs +++ b/src/test/ui/maybe-bounds-where-cpass.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass struct S(*const T) where T: ?Sized; -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let u = vec![1, 2, 3]; let _s: S<[u8]> = S(&u[..]); } diff --git a/src/test/ui/maybe-bounds-where-cpass.stderr b/src/test/ui/maybe-bounds-where-cpass.stderr deleted file mode 100644 index d60e4cdffb4f5..0000000000000 --- a/src/test/ui/maybe-bounds-where-cpass.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: compilation successful - --> $DIR/maybe-bounds-where-cpass.rs:16:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let u = vec![1, 2, 3]; -LL | | let _s: S<[u8]> = S(&u[..]); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/methods/method-call-lifetime-args-subst-index.rs b/src/test/ui/methods/method-call-lifetime-args-subst-index.rs index a9505e4f936a1..43a18fba9b89f 100644 --- a/src/test/ui/methods/method-call-lifetime-args-subst-index.rs +++ b/src/test/ui/methods/method-call-lifetime-args-subst-index.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass #![allow(unused)] struct S; @@ -21,5 +21,5 @@ fn test() { S.early_and_type::(); } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/methods/method-call-lifetime-args-subst-index.stderr b/src/test/ui/methods/method-call-lifetime-args-subst-index.stderr deleted file mode 100644 index 2848ff88c174c..0000000000000 --- a/src/test/ui/methods/method-call-lifetime-args-subst-index.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/method-call-lifetime-args-subst-index.rs:25:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/missing/missing-semicolon-warning.rs b/src/test/ui/missing/missing-semicolon-warning.rs index bbc958b87a571..219f68877be52 100644 --- a/src/test/ui/missing/missing-semicolon-warning.rs +++ b/src/test/ui/missing/missing-semicolon-warning.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass #![allow(unused)] macro_rules! m { @@ -18,5 +18,5 @@ macro_rules! m { } } -#[rustc_error] -fn main() { m!(0, 0; 0, 0); } //~ ERROR compilation successful + +fn main() { m!(0, 0; 0, 0); } diff --git a/src/test/ui/missing/missing-semicolon-warning.stderr b/src/test/ui/missing/missing-semicolon-warning.stderr index b4427565a8649..c294e3eaf9c83 100644 --- a/src/test/ui/missing/missing-semicolon-warning.stderr +++ b/src/test/ui/missing/missing-semicolon-warning.stderr @@ -4,7 +4,7 @@ warning: expected `;`, found keyword `let` LL | $( let x = $e1 )*; //~ WARN expected `;` | ^^^ ... -LL | fn main() { m!(0, 0; 0, 0); } //~ ERROR compilation successful +LL | fn main() { m!(0, 0; 0, 0); } | --------------- in this macro invocation | = note: This was erroneously allowed and will become a hard error in a future release @@ -15,16 +15,8 @@ warning: expected `;`, found `println` LL | $( println!("{}", $e2) )*; //~ WARN expected `;` | ^^^^^^^ ... -LL | fn main() { m!(0, 0; 0, 0); } //~ ERROR compilation successful +LL | fn main() { m!(0, 0; 0, 0); } | --------------- in this macro invocation | = note: This was erroneously allowed and will become a hard error in a future release -error: compilation successful - --> $DIR/missing-semicolon-warning.rs:22:1 - | -LL | fn main() { m!(0, 0; 0, 0); } //~ ERROR compilation successful - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/never-assign-dead-code.rs b/src/test/ui/never-assign-dead-code.rs index 0fb75b535c6bc..0762e87207227 100644 --- a/src/test/ui/never-assign-dead-code.rs +++ b/src/test/ui/never-assign-dead-code.rs @@ -11,11 +11,11 @@ // Test that an assignment of type ! makes the rest of the block dead code. #![feature(never_type)] -#![feature(rustc_attrs)] +// compile-pass #![warn(unused)] -#[rustc_error] -fn main() { //~ ERROR: compilation successful + +fn main() { let x: ! = panic!("aah"); //~ WARN unused drop(x); //~ WARN unreachable //~^ WARN unreachable diff --git a/src/test/ui/never-assign-dead-code.stderr b/src/test/ui/never-assign-dead-code.stderr index 7c7126c93c673..a4fd7b1b29681 100644 --- a/src/test/ui/never-assign-dead-code.stderr +++ b/src/test/ui/never-assign-dead-code.stderr @@ -30,15 +30,3 @@ LL | #![warn(unused)] | ^^^^^^ = note: #[warn(unused_variables)] implied by #[warn(unused)] -error: compilation successful - --> $DIR/never-assign-dead-code.rs:18:1 - | -LL | / fn main() { //~ ERROR: compilation successful -LL | | let x: ! = panic!("aah"); //~ WARN unused -LL | | drop(x); //~ WARN unreachable -LL | | //~^ WARN unreachable -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/no-warn-on-field-replace-issue-34101.rs b/src/test/ui/no-warn-on-field-replace-issue-34101.rs index 2940b891534d3..891512c9653be 100644 --- a/src/test/ui/no-warn-on-field-replace-issue-34101.rs +++ b/src/test/ui/no-warn-on-field-replace-issue-34101.rs @@ -20,15 +20,15 @@ // even though the compiler should enforce an invariant that any drop // flag for such subcontent of `Foo` will always have the same value // as the drop flag for `Foo` itself. -// -// This test is structured in a funny way; we cannot test for emission -// of the warning in question via the lint system, and therefore -// `#![deny(warnings)]` does nothing to detect it. -// -// So instead we use `#[rustc_error]` and put the test into -// `compile_fail`, where the emitted warning *will* be caught. -#![feature(rustc_attrs)] + + + + + + + +// compile-pass struct Foo(String); @@ -49,8 +49,8 @@ fn outline() { f.0 = String::from("bar"); } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { inline(); outline(); } diff --git a/src/test/ui/no-warn-on-field-replace-issue-34101.stderr b/src/test/ui/no-warn-on-field-replace-issue-34101.stderr deleted file mode 100644 index 91a90266e5e96..0000000000000 --- a/src/test/ui/no-warn-on-field-replace-issue-34101.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: compilation successful - --> $DIR/no-warn-on-field-replace-issue-34101.rs:53:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | inline(); -LL | | outline(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/object-safety/object-safety-by-value-self.rs b/src/test/ui/object-safety/object-safety-by-value-self.rs index 5a8772d61425f..6ec2ecba8cf32 100644 --- a/src/test/ui/object-safety/object-safety-by-value-self.rs +++ b/src/test/ui/object-safety/object-safety-by-value-self.rs @@ -10,7 +10,7 @@ // Check that a trait with by-value self is considered object-safe. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] #![allow(trivial_casts)] @@ -51,6 +51,6 @@ fn make_quux_explicit(t: &T) -> &Quux { t as &Quux } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/object-safety/object-safety-by-value-self.stderr b/src/test/ui/object-safety/object-safety-by-value-self.stderr deleted file mode 100644 index 61259641c0e84..0000000000000 --- a/src/test/ui/object-safety/object-safety-by-value-self.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error: compilation successful - --> $DIR/object-safety-by-value-self.rs:55:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/object-safety/object-safety-phantom-fn.rs b/src/test/ui/object-safety/object-safety-phantom-fn.rs index 518c45ac9dff6..34b66b15e572b 100644 --- a/src/test/ui/object-safety/object-safety-phantom-fn.rs +++ b/src/test/ui/object-safety/object-safety-phantom-fn.rs @@ -10,7 +10,7 @@ // Check that `Self` appearing in a phantom fn does not make a trait not object safe. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] trait Baz { @@ -27,6 +27,6 @@ fn make_baz(t: &T) -> &Baz { t } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/object-safety/object-safety-phantom-fn.stderr b/src/test/ui/object-safety/object-safety-phantom-fn.stderr deleted file mode 100644 index 645867f460638..0000000000000 --- a/src/test/ui/object-safety/object-safety-phantom-fn.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error: compilation successful - --> $DIR/object-safety-phantom-fn.rs:31:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/on-unimplemented/multiple-impls.rs b/src/test/ui/on-unimplemented/multiple-impls.rs index 539f5d63c0b3b..4467ac4356b6e 100644 --- a/src/test/ui/on-unimplemented/multiple-impls.rs +++ b/src/test/ui/on-unimplemented/multiple-impls.rs @@ -11,7 +11,7 @@ // Test if the on_unimplemented message override works #![feature(on_unimplemented)] -#![feature(rustc_attrs)] + struct Foo(T); struct Bar(T); @@ -38,7 +38,7 @@ impl Index> for [i32] { } } -#[rustc_error] + fn main() { Index::index(&[] as &[i32], 2u32); //~^ ERROR E0277 diff --git a/src/test/ui/on-unimplemented/on-impl.rs b/src/test/ui/on-unimplemented/on-impl.rs index da56ae6499344..d104d1ed033ea 100644 --- a/src/test/ui/on-unimplemented/on-impl.rs +++ b/src/test/ui/on-unimplemented/on-impl.rs @@ -11,7 +11,7 @@ // Test if the on_unimplemented message override works #![feature(on_unimplemented)] -#![feature(rustc_attrs)] + #[rustc_on_unimplemented = "invalid"] trait Index { @@ -27,7 +27,7 @@ impl Index for [i32] { } } -#[rustc_error] + fn main() { Index::::index(&[1, 2, 3] as &[i32], 2u32); //~^ ERROR E0277 diff --git a/src/test/ui/on-unimplemented/slice-index.rs b/src/test/ui/on-unimplemented/slice-index.rs index 7d67e89a78e36..79bb277d2c1e6 100644 --- a/src/test/ui/on-unimplemented/slice-index.rs +++ b/src/test/ui/on-unimplemented/slice-index.rs @@ -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 diff --git a/src/test/ui/privacy/restricted/lookup-ignores-private.rs b/src/test/ui/privacy/restricted/lookup-ignores-private.rs index abd71b9c90b22..1eda959e3f634 100644 --- a/src/test/ui/privacy/restricted/lookup-ignores-private.rs +++ b/src/test/ui/privacy/restricted/lookup-ignores-private.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass #![allow(warnings)] mod foo { @@ -36,8 +36,8 @@ mod foo { } } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let s = foo::S::default(); let _: bool = s.x; let _: bool = s.f(); diff --git a/src/test/ui/privacy/restricted/lookup-ignores-private.stderr b/src/test/ui/privacy/restricted/lookup-ignores-private.stderr deleted file mode 100644 index 7fc53e8c324a0..0000000000000 --- a/src/test/ui/privacy/restricted/lookup-ignores-private.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: compilation successful - --> $DIR/lookup-ignores-private.rs:40:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let s = foo::S::default(); -LL | | let _: bool = s.x; -LL | | let _: bool = s.f(); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/range/range_traits-4.rs b/src/test/ui/range/range_traits-4.rs index 630969bdbdf72..24a1bcb37cf06 100644 --- a/src/test/ui/range/range_traits-4.rs +++ b/src/test/ui/range/range_traits-4.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass use std::ops::*; #[derive(Copy, Clone)] struct R(RangeTo); -#[rustc_error] -fn main() {} //~ ERROR success + +fn main() {} diff --git a/src/test/ui/range/range_traits-4.stderr b/src/test/ui/range/range_traits-4.stderr deleted file mode 100644 index cf8ae671ffc74..0000000000000 --- a/src/test/ui/range/range_traits-4.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/range_traits-4.rs:19:1 - | -LL | fn main() {} //~ ERROR success - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/range/range_traits-5.rs b/src/test/ui/range/range_traits-5.rs index 5963c4a9496cb..033f06f9cd16a 100644 --- a/src/test/ui/range/range_traits-5.rs +++ b/src/test/ui/range/range_traits-5.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass use std::ops::*; #[derive(Copy, Clone)] struct R(RangeFull); -#[rustc_error] -fn main() {} //~ ERROR success + +fn main() {} diff --git a/src/test/ui/range/range_traits-5.stderr b/src/test/ui/range/range_traits-5.stderr deleted file mode 100644 index eadb3a08ba02a..0000000000000 --- a/src/test/ui/range/range_traits-5.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/range_traits-5.rs:19:1 - | -LL | fn main() {} //~ ERROR success - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/range/range_traits-7.rs b/src/test/ui/range/range_traits-7.rs index 871b55b85cf88..23fb0a1fc5e1b 100644 --- a/src/test/ui/range/range_traits-7.rs +++ b/src/test/ui/range/range_traits-7.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs)] +// compile-pass use std::ops::*; #[derive(Copy, Clone)] struct R(RangeToInclusive); -#[rustc_error] -fn main() {} //~ ERROR success + +fn main() {} diff --git a/src/test/ui/range/range_traits-7.stderr b/src/test/ui/range/range_traits-7.stderr deleted file mode 100644 index 516667a11cd34..0000000000000 --- a/src/test/ui/range/range_traits-7.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/range_traits-7.rs:19:1 - | -LL | fn main() {} //~ ERROR success - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.rs b/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.rs index c1df057b39609..00ca2c7da6719 100644 --- a/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.rs +++ b/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.rs @@ -11,7 +11,7 @@ // Test related to #22779. In this case, the impl is an inherent impl, // so it doesn't have to match any trait, so no error results. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] struct MySlice<'a, T:'a>(&'a mut [T]); @@ -22,5 +22,5 @@ impl<'a, T> MySlice<'a, T> { } } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.stderr b/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.stderr deleted file mode 100644 index 585ccf465d8f4..0000000000000 --- a/src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/region-bound-extra-bound-in-inherent-impl.rs:26:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs b/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs index 3115e5a9a4376..ff1b74fa020c7 100644 --- a/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs +++ b/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs @@ -11,7 +11,7 @@ // Test related to #22779, but where the `'a:'b` relation // appears in the trait too. No error here. -#![feature(rustc_attrs)] +// compile-pass trait Tr<'a, T> { fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b; @@ -23,5 +23,5 @@ impl<'a, T> Tr<'a, T> for &'a mut [T] { } } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.stderr b/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.stderr deleted file mode 100644 index ce9dd59bbf525..0000000000000 --- a/src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/region-bound-same-bounds-in-trait-and-impl.rs:27:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/region-object-lifetime-1.rs b/src/test/ui/regions/region-object-lifetime-1.rs index 1e615be9d6acc..36c87b729d842 100644 --- a/src/test/ui/regions/region-object-lifetime-1.rs +++ b/src/test/ui/regions/region-object-lifetime-1.rs @@ -11,7 +11,7 @@ // Various tests related to testing how region inference works // with respect to the object receivers. -#![feature(rustc_attrs)] +// compile-pass #![allow(warnings)] trait Foo { @@ -24,5 +24,5 @@ fn borrowed_receiver_same_lifetime<'a>(x: &'a Foo) -> &'a () { x.borrowed() } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/regions/region-object-lifetime-1.stderr b/src/test/ui/regions/region-object-lifetime-1.stderr deleted file mode 100644 index 39deed32c7659..0000000000000 --- a/src/test/ui/regions/region-object-lifetime-1.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/region-object-lifetime-1.rs:28:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/region-object-lifetime-3.rs b/src/test/ui/regions/region-object-lifetime-3.rs index 84dd97643a107..d7bfb735e00fd 100644 --- a/src/test/ui/regions/region-object-lifetime-3.rs +++ b/src/test/ui/regions/region-object-lifetime-3.rs @@ -11,7 +11,7 @@ // Various tests related to testing how region inference works // with respect to the object receivers. -#![feature(rustc_attrs)] +// compile-pass #![allow(warnings)] trait Foo { @@ -24,5 +24,5 @@ fn borrowed_receiver_related_lifetimes<'a,'b>(x: &'a (Foo+'b)) -> &'a () { x.borrowed() } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/regions/region-object-lifetime-3.stderr b/src/test/ui/regions/region-object-lifetime-3.stderr deleted file mode 100644 index 9431e8f529139..0000000000000 --- a/src/test/ui/regions/region-object-lifetime-3.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/region-object-lifetime-3.rs:28:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-2.rs b/src/test/ui/regions/regions-implied-bounds-projection-gap-2.rs index b3037a1e187f4..09e1634381fed 100644 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-2.rs +++ b/src/test/ui/regions/regions-implied-bounds-projection-gap-2.rs @@ -12,7 +12,7 @@ // "projection gap": in this test, we know that `T: 'x`, and that is // enough to conclude that `T::Foo: 'x`. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] @@ -29,5 +29,5 @@ fn func<'x, T:Trait1<'x>>(t: &'x T) wf::<&'x T::Foo>(); } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-2.stderr b/src/test/ui/regions/regions-implied-bounds-projection-gap-2.stderr deleted file mode 100644 index 7a38797e469bc..0000000000000 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-2.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/regions-implied-bounds-projection-gap-2.rs:33:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-3.rs b/src/test/ui/regions/regions-implied-bounds-projection-gap-3.rs index a2e6de2137696..be1987fe87c2d 100644 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-3.rs +++ b/src/test/ui/regions/regions-implied-bounds-projection-gap-3.rs @@ -12,7 +12,7 @@ // "projection gap": in this test, we know that `T::Foo: 'x`, and that // is (naturally) enough to conclude that `T::Foo: 'x`. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] @@ -29,5 +29,5 @@ fn func<'x, T:Trait1<'x>>(t: &'x T::Foo) wf::<&'x T::Foo>(); } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-3.stderr b/src/test/ui/regions/regions-implied-bounds-projection-gap-3.stderr deleted file mode 100644 index 1a12697a474ae..0000000000000 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-3.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/regions-implied-bounds-projection-gap-3.rs:33:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-4.rs b/src/test/ui/regions/regions-implied-bounds-projection-gap-4.rs index b8582f8c26b31..d0560d4cd9084 100644 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-4.rs +++ b/src/test/ui/regions/regions-implied-bounds-projection-gap-4.rs @@ -12,7 +12,7 @@ // "projection gap": in this test, we know that `T: 'x`, and that // is (naturally) enough to conclude that `T: 'x`. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] #![allow(unused_variables)] @@ -29,5 +29,5 @@ fn func<'x, T:Trait1<'x>>(t: &'x T) wf::<&'x T>(); } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/regions/regions-implied-bounds-projection-gap-4.stderr b/src/test/ui/regions/regions-implied-bounds-projection-gap-4.stderr deleted file mode 100644 index 85b1702e2a096..0000000000000 --- a/src/test/ui/regions/regions-implied-bounds-projection-gap-4.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/regions-implied-bounds-projection-gap-4.rs:33:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/regions-outlives-projection-container-hrtb.rs b/src/test/ui/regions/regions-outlives-projection-container-hrtb.rs index ec0631a881a37..270e20f2e6dce 100644 --- a/src/test/ui/regions/regions-outlives-projection-container-hrtb.rs +++ b/src/test/ui/regions/regions-outlives-projection-container-hrtb.rs @@ -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() { } diff --git a/src/test/ui/regions/regions-outlives-projection-hrtype.rs b/src/test/ui/regions/regions-outlives-projection-hrtype.rs index 2d271b7be73e0..d6d4e2b052906 100644 --- a/src/test/ui/regions/regions-outlives-projection-hrtype.rs +++ b/src/test/ui/regions/regions-outlives-projection-hrtype.rs @@ -15,7 +15,7 @@ // `'r` is bound, that leads to badness. This test checks that // everything works. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] trait TheTrait { @@ -32,5 +32,5 @@ fn foo<'a,'b,T>() wf::< as TheTrait>::TheType >(); } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/regions/regions-outlives-projection-hrtype.stderr b/src/test/ui/regions/regions-outlives-projection-hrtype.stderr deleted file mode 100644 index ba4e318957e60..0000000000000 --- a/src/test/ui/regions/regions-outlives-projection-hrtype.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/regions-outlives-projection-hrtype.rs:36:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/regions-outlives-projection-trait-def.rs b/src/test/ui/regions/regions-outlives-projection-trait-def.rs index 04682a7729735..b05788dc4136b 100644 --- a/src/test/ui/regions/regions-outlives-projection-trait-def.rs +++ b/src/test/ui/regions/regions-outlives-projection-trait-def.rs @@ -11,7 +11,7 @@ // Test that `>::Type: 'b`, where `trait Foo<'a> { Type: // 'a; }`, does not require that `F: 'b`. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] trait SomeTrait<'a> { @@ -27,5 +27,5 @@ impl<'a: 'c, 'c, T> SomeTrait<'a> for &'c T where T: SomeTrait<'a> { // here, then we would require that `T:'a`, which is too strong. } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/regions/regions-outlives-projection-trait-def.stderr b/src/test/ui/regions/regions-outlives-projection-trait-def.stderr deleted file mode 100644 index 0a4cbe64d4638..0000000000000 --- a/src/test/ui/regions/regions-outlives-projection-trait-def.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/regions-outlives-projection-trait-def.rs:31:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/regions/regions-outlives-scalar.rs b/src/test/ui/regions/regions-outlives-scalar.rs index 94f7a350cf787..a203ebd919d7d 100644 --- a/src/test/ui/regions/regions-outlives-scalar.rs +++ b/src/test/ui/regions/regions-outlives-scalar.rs @@ -11,7 +11,7 @@ // Test that scalar values outlive all regions. // Rule OutlivesScalar from RFC 1214. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] struct Foo<'a> { @@ -19,5 +19,5 @@ struct Foo<'a> { y: &'static i32 } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/regions/regions-outlives-scalar.stderr b/src/test/ui/regions/regions-outlives-scalar.stderr deleted file mode 100644 index d754bdd60320e..0000000000000 --- a/src/test/ui/regions/regions-outlives-scalar.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/regions-outlives-scalar.rs:23:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/retslot-cast.rs b/src/test/ui/retslot-cast.rs index c5e26a26744df..a468163332647 100644 --- a/src/test/ui/retslot-cast.rs +++ b/src/test/ui/retslot-cast.rs @@ -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+Send)>) @@ -29,5 +29,5 @@ pub fn inner(x: Option<&(Iterator+Send)>) x } -#[rustc_error] + fn main() {} diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.rs b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.rs index 44af621ef24dc..77b5b401c42f1 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.rs +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.rs @@ -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() { } diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.rs b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.rs index 93f16350a7b4d..b6ac7aa3a9cd2 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.rs +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.rs @@ -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() { } diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.rs b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.rs index e44e049a9e5dc..3f7d086a6ae19 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.rs +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.rs @@ -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() { } diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.rs b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.rs index 1293e6c234bc1..dff9b8a862f6c 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.rs +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.rs @@ -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() { } diff --git a/src/test/ui/span/issue-24690.rs b/src/test/ui/span/issue-24690.rs index 041ca6c426c1f..b19461b03a0d5 100644 --- a/src/test/ui/span/issue-24690.rs +++ b/src/test/ui/span/issue-24690.rs @@ -11,14 +11,14 @@ //! A test to ensure that helpful `note` messages aren't emitted more often //! than necessary. -#![feature(rustc_attrs)] +// compile-pass // Although there are three warnings, we should only get two "lint level defined // here" notes pointing at the `warnings` span, one for each error type. #![warn(unused)] -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let theTwo = 2; //~ WARN should have a snake case name let theOtherTwo = 2; //~ WARN should have a snake case name //~^ WARN unused variable diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index b496a1a76c017..723b7e2c0aaf5 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -25,16 +25,3 @@ warning: variable `theOtherTwo` should have a snake case name such as `the_other LL | let theOtherTwo = 2; //~ WARN should have a snake case name | ^^^^^^^^^^^ -error: compilation successful - --> $DIR/issue-24690.rs:21:1 - | -LL | / fn main() { //~ ERROR compilation successful -LL | | let theTwo = 2; //~ WARN should have a snake case name -LL | | let theOtherTwo = 2; //~ WARN should have a snake case name -LL | | //~^ WARN unused variable -LL | | println!("{}", theTwo); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/traits/trait-privacy.rs b/src/test/ui/traits/trait-privacy.rs index 5f9e8ba6c0a4a..85001fc0ff6e9 100644 --- a/src/test/ui/traits/trait-privacy.rs +++ b/src/test/ui/traits/trait-privacy.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rustc_attrs, get_type_id)] +// compile-pass +#![feature(get_type_id)] #![allow(dead_code)] - mod foo { pub use self::bar::T; mod bar { @@ -31,5 +31,5 @@ fn f() { error.get_type_id(); // Regression test for #21670 } -#[rustc_error] -fn main() {} //~ ERROR compilation successful + +fn main() {} diff --git a/src/test/ui/traits/trait-privacy.stderr b/src/test/ui/traits/trait-privacy.stderr deleted file mode 100644 index d38e869df8f51..0000000000000 --- a/src/test/ui/traits/trait-privacy.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/trait-privacy.rs:35:1 - | -LL | fn main() {} //~ ERROR compilation successful - | ^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/traits/traits-issue-23003-overflow.rs b/src/test/ui/traits/traits-issue-23003-overflow.rs index 80d2884ee60aa..2f694e3ca7c5e 100644 --- a/src/test/ui/traits/traits-issue-23003-overflow.rs +++ b/src/test/ui/traits/traits-issue-23003-overflow.rs @@ -12,7 +12,7 @@ // types are required. This test now just compiles fine, since the // relevant rules that triggered the overflow were removed. -#![feature(rustc_attrs)] +// compile-pass #![allow(dead_code)] use std::marker::PhantomData; @@ -35,5 +35,5 @@ impl Async for Complete { fn foo(_: Receipt>) { } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/traits/traits-issue-23003-overflow.stderr b/src/test/ui/traits/traits-issue-23003-overflow.stderr deleted file mode 100644 index 3c26e426a4e52..0000000000000 --- a/src/test/ui/traits/traits-issue-23003-overflow.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/traits-issue-23003-overflow.rs:39:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/unreachable/unreachable-try-pattern.rs b/src/test/ui/unreachable/unreachable-try-pattern.rs index df340095bb433..2c0690881a1cd 100644 --- a/src/test/ui/unreachable/unreachable-try-pattern.rs +++ b/src/test/ui/unreachable/unreachable-try-pattern.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(never_type)] -#![feature(exhaustive_patterns, rustc_attrs)] +// compile-pass +#![feature(never_type, exhaustive_patterns)] #![warn(unreachable_code)] #![warn(unreachable_patterns)] @@ -42,8 +42,8 @@ fn vom(x: Result) -> Result { Ok(y) } -#[rustc_error] -fn main() { //~ ERROR: compilation successful + +fn main() { let _ = bar(Err(123)); let _ = foo(Err(123)); let _ = qux(Ok(123)); diff --git a/src/test/ui/unreachable/unreachable-try-pattern.stderr b/src/test/ui/unreachable/unreachable-try-pattern.stderr index a8a0ed3d03b84..1916174142fde 100644 --- a/src/test/ui/unreachable/unreachable-try-pattern.stderr +++ b/src/test/ui/unreachable/unreachable-try-pattern.stderr @@ -28,16 +28,3 @@ warning: unreachable pattern LL | let y = (match x { Ok(n) => Ok(n), Err(e) => Err(e) })?; | ^^^^^^ -error: compilation successful - --> $DIR/unreachable-try-pattern.rs:46:1 - | -LL | / fn main() { //~ ERROR: compilation successful -LL | | let _ = bar(Err(123)); -LL | | let _ = foo(Err(123)); -LL | | let _ = qux(Ok(123)); -LL | | let _ = vom(Ok(123)); -LL | | } - | |_^ - -error: aborting due to previous error - diff --git a/src/test/ui/variance/variance-btree-invariant-types.rs b/src/test/ui/variance/variance-btree-invariant-types.rs index e9607de00a34f..59fc0136612dd 100644 --- a/src/test/ui/variance/variance-btree-invariant-types.rs +++ b/src/test/ui/variance/variance-btree-invariant-types.rs @@ -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() { } diff --git a/src/test/ui/variance/variance-use-contravariant-struct-1.rs b/src/test/ui/variance/variance-use-contravariant-struct-1.rs index d2fd2978750e7..47ecec5a1124e 100644 --- a/src/test/ui/variance/variance-use-contravariant-struct-1.rs +++ b/src/test/ui/variance/variance-use-contravariant-struct-1.rs @@ -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(fn(T)); @@ -22,5 +22,5 @@ fn foo<'min,'max>(v: SomeStruct<&'max ()>) v //~ ERROR mismatched types } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/variance/variance-use-contravariant-struct-2.rs b/src/test/ui/variance/variance-use-contravariant-struct-2.rs index b38fd0e9ffcc6..88585373847dd 100644 --- a/src/test/ui/variance/variance-use-contravariant-struct-2.rs +++ b/src/test/ui/variance/variance-use-contravariant-struct-2.rs @@ -12,7 +12,7 @@ // they permit lifetimes to be approximated as expected. #![allow(dead_code)] -#![feature(rustc_attrs)] +// compile-pass struct SomeStruct(fn(T)); @@ -23,5 +23,5 @@ fn bar<'min,'max>(v: SomeStruct<&'min ()>) v } -#[rustc_error] -fn main() { } //~ ERROR compilation successful + +fn main() { } diff --git a/src/test/ui/variance/variance-use-contravariant-struct-2.stderr b/src/test/ui/variance/variance-use-contravariant-struct-2.stderr deleted file mode 100644 index e3663eb03450d..0000000000000 --- a/src/test/ui/variance/variance-use-contravariant-struct-2.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/variance-use-contravariant-struct-2.rs:27:1 - | -LL | fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/variance/variance-use-covariant-struct-2.rs b/src/test/ui/variance/variance-use-covariant-struct-2.rs index d8e1a5f5f1c54..245e21511a6f8 100644 --- a/src/test/ui/variance/variance-use-covariant-struct-2.rs +++ b/src/test/ui/variance/variance-use-covariant-struct-2.rs @@ -12,7 +12,7 @@ // be shortened. #![allow(dead_code)] -#![feature(rustc_attrs)] +// compile-pass struct SomeStruct(T); @@ -23,4 +23,4 @@ fn foo<'min,'max>(v: SomeStruct<&'max ()>) v } -#[rustc_error] fn main() { } //~ ERROR compilation successful +fn main() { } diff --git a/src/test/ui/variance/variance-use-covariant-struct-2.stderr b/src/test/ui/variance/variance-use-covariant-struct-2.stderr deleted file mode 100644 index 9c3a1cf1cc2c2..0000000000000 --- a/src/test/ui/variance/variance-use-covariant-struct-2.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: compilation successful - --> $DIR/variance-use-covariant-struct-2.rs:26:16 - | -LL | #[rustc_error] fn main() { } //~ ERROR compilation successful - | ^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/variance/variance-use-invariant-struct-1.rs b/src/test/ui/variance/variance-use-invariant-struct-1.rs index c89436b20949c..2e6c0c16dcd0d 100644 --- a/src/test/ui/variance/variance-use-invariant-struct-1.rs +++ b/src/test/ui/variance/variance-use-invariant-struct-1.rs @@ -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(*mut T); @@ -29,5 +29,5 @@ fn bar<'min,'max>(v: SomeStruct<&'min ()>) v //~ ERROR mismatched types } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-array-elem-sized.rs b/src/test/ui/wf/wf-array-elem-sized.rs index 946341a1a75bb..36e9226ae3f81 100644 --- a/src/test/ui/wf/wf-array-elem-sized.rs +++ b/src/test/ui/wf/wf-array-elem-sized.rs @@ -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() { } diff --git a/src/test/ui/wf/wf-const-type.rs b/src/test/ui/wf/wf-const-type.rs index c3015afd8dd0d..bc14ce46ff199 100644 --- a/src/test/ui/wf/wf-const-type.rs +++ b/src/test/ui/wf/wf-const-type.rs @@ -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: T } @@ -20,5 +20,5 @@ struct NotCopy; const FOO: IsCopy> = IsCopy { t: None }; //~^ ERROR E0277 -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-enum-bound.rs b/src/test/ui/wf/wf-enum-bound.rs index e3e79fdd940af..6c08f5a4a547e 100644 --- a/src/test/ui/wf/wf-enum-bound.rs +++ b/src/test/ui/wf/wf-enum-bound.rs @@ -11,7 +11,7 @@ // Test that we check enum bounds for WFedness. #![feature(associated_type_defaults)] -#![feature(rustc_attrs)] + #![allow(dead_code)] trait ExtraCopy { } @@ -22,5 +22,5 @@ enum SomeEnum //~ ERROR E0277 SomeVariant(T,U) } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-enum-fields-struct-variant.rs b/src/test/ui/wf/wf-enum-fields-struct-variant.rs index 5eb53e7edde6b..572b609fe2ef2 100644 --- a/src/test/ui/wf/wf-enum-fields-struct-variant.rs +++ b/src/test/ui/wf/wf-enum-fields-struct-variant.rs @@ -11,7 +11,7 @@ // Test that we check struct fields for WFedness. #![feature(associated_type_defaults)] -#![feature(rustc_attrs)] + #![allow(dead_code)] struct IsCopy { @@ -24,5 +24,5 @@ enum AnotherEnum { } } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-enum-fields.rs b/src/test/ui/wf/wf-enum-fields.rs index 76ad40f845768..32e870e9e1b5b 100644 --- a/src/test/ui/wf/wf-enum-fields.rs +++ b/src/test/ui/wf/wf-enum-fields.rs @@ -11,7 +11,7 @@ // Test that we check struct fields for WFedness. #![feature(associated_type_defaults)] -#![feature(rustc_attrs)] + #![allow(dead_code)] struct IsCopy { @@ -22,5 +22,5 @@ enum SomeEnum { SomeVariant(IsCopy) //~ ERROR E0277 } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-fn-where-clause.rs b/src/test/ui/wf/wf-fn-where-clause.rs index 59bb8326ddbf5..3d97bdb521fa8 100644 --- a/src/test/ui/wf/wf-fn-where-clause.rs +++ b/src/test/ui/wf/wf-fn-where-clause.rs @@ -10,7 +10,7 @@ // Test that we check where-clauses on fn items. -#![feature(rustc_attrs)] + #![allow(dead_code)] trait ExtraCopy { } @@ -23,5 +23,5 @@ fn bar() where Vec:, {} //~^ ERROR E0277 //~| ERROR E0038 -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-impl-associated-type-region.rs b/src/test/ui/wf/wf-impl-associated-type-region.rs index a319b676eeb88..aa88b3d7377e0 100644 --- a/src/test/ui/wf/wf-impl-associated-type-region.rs +++ b/src/test/ui/wf/wf-impl-associated-type-region.rs @@ -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() { } diff --git a/src/test/ui/wf/wf-impl-associated-type-trait.rs b/src/test/ui/wf/wf-impl-associated-type-trait.rs index 1e82f609d2a7f..0b5a76db26266 100644 --- a/src/test/ui/wf/wf-impl-associated-type-trait.rs +++ b/src/test/ui/wf/wf-impl-associated-type-trait.rs @@ -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 Foo for T { //~^ ERROR the trait bound `T: MyHash` is not satisfied } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-in-fn-type-static.rs b/src/test/ui/wf/wf-in-fn-type-static.rs index 8e3bca0975813..dfe6688c0b7f2 100644 --- a/src/test/ui/wf/wf-in-fn-type-static.rs +++ b/src/test/ui/wf/wf-in-fn-type-static.rs @@ -12,7 +12,7 @@ // types in fns. #![allow(dead_code)] -#![feature(rustc_attrs)] + struct MustBeCopy { t: T @@ -28,5 +28,5 @@ struct Bar { x: fn(&'static T) //~ ERROR E0310 } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-in-fn-where-clause.rs b/src/test/ui/wf/wf-in-fn-where-clause.rs index c2f66a2a460c5..f6f14099e738e 100644 --- a/src/test/ui/wf/wf-in-fn-where-clause.rs +++ b/src/test/ui/wf/wf-in-fn-where-clause.rs @@ -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 { @@ -21,5 +21,5 @@ fn bar() //~ ERROR E0277 { } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-in-obj-type-static.rs b/src/test/ui/wf/wf-in-obj-type-static.rs index 11535fb9f9e45..7cbcf99af3c68 100644 --- a/src/test/ui/wf/wf-in-obj-type-static.rs +++ b/src/test/ui/wf/wf-in-obj-type-static.rs @@ -10,7 +10,7 @@ // Check that we enforce WF conditions also for types in fns. -#![feature(rustc_attrs)] + #![allow(dead_code)] trait Object { } @@ -24,5 +24,5 @@ struct Foo { x: Object<&'static T> //~ ERROR E0310 } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-inherent-impl-method-where-clause.rs b/src/test/ui/wf/wf-inherent-impl-method-where-clause.rs index 78e12c47e24de..8b65b2e162667 100644 --- a/src/test/ui/wf/wf-inherent-impl-method-where-clause.rs +++ b/src/test/ui/wf/wf-inherent-impl-method-where-clause.rs @@ -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 { } @@ -23,5 +23,5 @@ impl Foo { {} } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-inherent-impl-where-clause.rs b/src/test/ui/wf/wf-inherent-impl-where-clause.rs index 7edbb11e24520..ee92928284902 100644 --- a/src/test/ui/wf/wf-inherent-impl-where-clause.rs +++ b/src/test/ui/wf/wf-inherent-impl-where-clause.rs @@ -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 { } @@ -22,5 +22,5 @@ impl Foo where T: ExtraCopy //~ ERROR E0277 { } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-static-type.rs b/src/test/ui/wf/wf-static-type.rs index ba02c5dca3e6d..91943b44d97ad 100644 --- a/src/test/ui/wf/wf-static-type.rs +++ b/src/test/ui/wf/wf-static-type.rs @@ -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: T } @@ -20,5 +20,5 @@ struct NotCopy; static FOO: IsCopy> = IsCopy { t: None }; //~^ ERROR E0277 -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-struct-bound.rs b/src/test/ui/wf/wf-struct-bound.rs index e263b251aa379..c4a15bbe5407c 100644 --- a/src/test/ui/wf/wf-struct-bound.rs +++ b/src/test/ui/wf/wf-struct-bound.rs @@ -11,7 +11,7 @@ // Test that we check struct bounds for WFedness. #![feature(associated_type_defaults)] -#![feature(rustc_attrs)] + #![allow(dead_code)] trait ExtraCopy { } @@ -22,5 +22,5 @@ struct SomeStruct //~ ERROR E0277 data: (T,U) } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-struct-field.rs b/src/test/ui/wf/wf-struct-field.rs index 8a631a6c335a0..4d1e42829d88b 100644 --- a/src/test/ui/wf/wf-struct-field.rs +++ b/src/test/ui/wf/wf-struct-field.rs @@ -11,7 +11,7 @@ // Test that we check struct fields for WFedness. #![feature(associated_type_defaults)] -#![feature(rustc_attrs)] + #![allow(dead_code)] struct IsCopy { @@ -22,5 +22,5 @@ struct SomeStruct { data: IsCopy //~ ERROR E0277 } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-trait-associated-type-bound.rs b/src/test/ui/wf/wf-trait-associated-type-bound.rs index 8420edd66a180..eaeffa017400e 100644 --- a/src/test/ui/wf/wf-trait-associated-type-bound.rs +++ b/src/test/ui/wf/wf-trait-associated-type-bound.rs @@ -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 { } @@ -20,5 +20,5 @@ trait SomeTrait { //~ ERROR E0277 type Type1: ExtraCopy; } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-trait-associated-type-region.rs b/src/test/ui/wf/wf-trait-associated-type-region.rs index 95d9ffdf9d359..61cdbe5e49128 100644 --- a/src/test/ui/wf/wf-trait-associated-type-region.rs +++ b/src/test/ui/wf/wf-trait-associated-type-region.rs @@ -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() { } diff --git a/src/test/ui/wf/wf-trait-associated-type-trait.rs b/src/test/ui/wf/wf-trait-associated-type-trait.rs index 902cbe2676b06..e752c0a9077ce 100644 --- a/src/test/ui/wf/wf-trait-associated-type-trait.rs +++ b/src/test/ui/wf/wf-trait-associated-type-trait.rs @@ -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 { x: T } @@ -22,5 +22,5 @@ trait SomeTrait { //~^ ERROR E0277 } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-trait-bound.rs b/src/test/ui/wf/wf-trait-bound.rs index ca15a6ab64863..c02281ab4f950 100644 --- a/src/test/ui/wf/wf-trait-bound.rs +++ b/src/test/ui/wf/wf-trait-bound.rs @@ -11,7 +11,7 @@ // Test that we check supertrait bounds for WFedness. #![feature(associated_type_defaults)] -#![feature(rustc_attrs)] + #![allow(dead_code)] trait ExtraCopy { } @@ -21,5 +21,5 @@ trait SomeTrait //~ ERROR E0277 { } -#[rustc_error] + fn main() { } diff --git a/src/test/ui/wf/wf-trait-default-fn-arg.rs b/src/test/ui/wf/wf-trait-default-fn-arg.rs index 453aa2428ce5d..8577bc8963826 100644 --- a/src/test/ui/wf/wf-trait-default-fn-arg.rs +++ b/src/test/ui/wf/wf-trait-default-fn-arg.rs @@ -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() { } diff --git a/src/test/ui/wf/wf-trait-default-fn-where-clause.rs b/src/test/ui/wf/wf-trait-default-fn-where-clause.rs index 29c85250583c7..b157671987041 100644 --- a/src/test/ui/wf/wf-trait-default-fn-where-clause.rs +++ b/src/test/ui/wf/wf-trait-default-fn-where-clause.rs @@ -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() { } diff --git a/src/test/ui/wf/wf-trait-fn-where-clause.rs b/src/test/ui/wf/wf-trait-fn-where-clause.rs index f46a54504a0b5..44e3d6bda5cd8 100644 --- a/src/test/ui/wf/wf-trait-fn-where-clause.rs +++ b/src/test/ui/wf/wf-trait-fn-where-clause.rs @@ -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() { }