diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-10-31 13:08:01 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-11-07 13:09:52 +0100 |
| commit | a2e090624e2246f628786a19581d9aa53d7b2ad0 (patch) | |
| tree | 032ae8c5bb7f62c55fffd2ecf2240bf52203a241 | |
| parent | 0332a39f07f259fc346be91d2cb41d58e8a968b7 (diff) | |
| download | rust-a2e090624e2246f628786a19581d9aa53d7b2ad0.tar.gz rust-a2e090624e2246f628786a19581d9aa53d7b2ad0.zip | |
Removed `#[rustc_error]` from tests that are all `// compile-pass`.
I also added `// skip-codegen` to each one, to address potential concerns that this change would otherwise slow down our test suite spending time generating code for files that are really just meant to be checks of compiler diagnostics. (However, I will say: My preference is to not use `// skip-codegen` if one can avoid it. We can use all the testing of how we drive LLVM that we can get...) (Updated post rebase.)
190 files changed, 362 insertions, 1213 deletions
diff --git a/src/test/ui/asm/asm-misplaced-option.rs b/src/test/ui/asm/asm-misplaced-option.rs index bfc1fd68fe0..bb75fbc5bc4 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 46723918a3a..589fd47cc1e 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 a753527ea53..c4b8164522c 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<T> = Result<T, ()>; 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 99281e74565..00000000000 --- 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 d1117328c86..01bf25ba993 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 c5314b58002..00000000000 --- 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 c9394954c5f..1a8c18db896 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 d3224607314..aa455c51932 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 a52af0873a8..1ce455123aa 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<i32> for Baz { } impl<A:Iterator> Foo<A::Item> 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 1b9a32525bf..00000000000 --- 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 af88f3744ea..dfb2ef0a2ba 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<P> {} 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 945f3b396b7..00000000000 --- 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 9fbb7aa4cb1..7d41fc1fb63 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<T: lib::MyCopy> MyTrait for T { } // Huzzah. impl MyTrait for lib::MyFundamentalStruct<MyType> { } -#[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 675dc1b7004..00000000000 --- 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 2f6dca4f3c2..15acf1a99af 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<T: lib::MyCopy> 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 5143d4e874b..00000000000 --- 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_local.rs b/src/test/ui/coherence/coherence_local.rs index 551577b6b4e..7124c05036c 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<MyType> { } impl lib::MyCopy for lib::MyFundamentalStruct<MyType> { } impl lib::MyCopy for lib::MyFundamentalStruct<Box<MyType>> { } -#[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 c4340e8d876..00000000000 --- 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_ref.rs b/src/test/ui/coherence/coherence_local_ref.rs index f6e1aab5976..de26433012d 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 13d6fdd80f8..00000000000 --- 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 7d799850a65..b2805d76d8f 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 67e59d054d5..00000000000 --- 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 0f413b0bbc1..031576dd308 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 50c959d6805..00000000000 --- 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 77351f6e4f1..9fd9f7b85af 100644 --- a/src/test/ui/expanded-cfg.rs +++ b/src/test/ui/expanded-cfg.rs @@ -7,9 +7,9 @@ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 d7bc47fad27..00000000000 --- 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-deprecated.rs b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs index 98da43c3a22..3f423a415cf 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 802c5d9384d..00000000000 --- 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/glob-cycles.rs b/src/test/ui/glob-cycles.rs index 8f1b8ec91db..d57dad074b2 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 a9fd9306e21..00000000000 --- 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 46a138749ff..bdf591ba7ab 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 0adf80994f7..00000000000 --- 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 15f04df6939..a52bb7f8a28 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 6862560570d..00000000000 --- 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 b09883d9ade..663e1379b40 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 3f02223fb67..ce4ffe796f3 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 0bda06be9e8..b41d81f332c 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 a1913e0057c..00000000000 --- 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 ae4e8ce1df8..d1d129c918a 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<Fn((&'a i32, &'a (Vec<&'static i32>, 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 8392b9da411..00000000000 --- 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 02b4932cea8..d76ded9e679 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<T> {} struct B<T> where B<T>: A<B<T>> { 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 594d76605fe..00000000000 --- 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 d08f916b870..271230ee427 100644 --- a/src/test/ui/issues/issue-22603.rs +++ b/src/test/ui/issues/issue-22603.rs @@ -7,9 +7,9 @@ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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<A> FnOnce<(A,)> for Foo { @@ -17,7 +17,7 @@ impl<A> 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 b50a5a25a7a..00000000000 --- 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 cba1c367bb9..9b4c9eb2d43 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 afeae9c78ef..00000000000 --- 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 afb972faaca..41bd5d7188f 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 eaebebe3b11..00000000000 --- 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 097f2a5630c..f047d6e7fff 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 4b17747f109..00000000000 --- 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 c128fb3b479..c930f26acf4 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<T> Mirror for T { } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let c: <u32 as Mirror>::It = 5; const CCCC: <u32 as Mirror>::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 1752d80fde3..00000000000 --- 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: <u32 as Mirror>::It = 5; -LL | | const CCCC: <u32 as Mirror>::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 6c98f3e8560..9751dae26be 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 f962f4c58c4..00000000000 --- 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 661579f52b6..be28bf0d272 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<T: 'static, W: Bar<Output = T>> 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 d5ba942b19f..00000000000 --- 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 d9ce1159c0e..f869c89b79c 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 2aaaa1578a5..00000000000 --- 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 e630a01a593..f96f1ae6921 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 04276ec1ffd..00000000000 --- 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 b3b34f4b0ef..c4e8450fabc 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 ba2c5396e4d..00000000000 --- 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 2c54ed3e857..1061ffe11e1 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 8e1430e505d..00000000000 --- 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 317a47156c1..c0b14da9b2c 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 c1e80b0eb78..00000000000 --- 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 6a411b4c59c..858c9f4ae3f 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>() -> 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 1b6577dc41f..00000000000 --- 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 117ab18a115..10ae2b8e6dc 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 b715fa84f60..00000000000 --- 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 30dd34ae9a0..55fec30cdde 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 cb8cfbd8599..00000000000 --- 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 6bc0add2205..394a85f8c89 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 4cb5ec1ae3b..00000000000 --- 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 be7e7820020..8aad248dc50 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 538cc7a581b..00000000000 --- 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 092bf00ddd6..57ca2c73d8e 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 349693f29d5..00000000000 --- 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 3afbfa61984..d16aa1acee0 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::<u8>); // 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 df69dcb0d92..5819ea78e24 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::<i32> = 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 b20765815e0..e2f8c00dfb9 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 b06591f411e..00000000000 --- 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 3e34b250672..9396b7ad1b1 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<T> Broken for T { } } -#[rustc_error] -fn main() { //~ ERROR compilation successful + +fn main() { let _m: &Broken<Assoc=()> = &(); } diff --git a/src/test/ui/issues/issue-36839.stderr b/src/test/ui/issues/issue-36839.stderr deleted file mode 100644 index dd78668801c..00000000000 --- 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<Assoc=()> = &(); -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 ab08e1899a0..adbd0c4b7ab 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<Self::NextState>; @@ -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 b0404088d4d..00000000000 --- 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 2a4808fb186..3486403f54a 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 8667feccf99..00000000000 --- 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 53c91f323d0..44fcc899837 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 48db0d5e202..00000000000 --- 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 d5733f98193..9ceefaf57b7 100644 --- a/src/test/ui/issues/issue-37515.rs +++ b/src/test/ui/issues/issue-37515.rs @@ -7,13 +7,13 @@ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 68e983f23b0..3a6e35bb12e 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 311d0ceb4d3..30552c03cde 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 1277d84a032..00000000000 --- 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 6b7dde117df..b0b79c1f49d 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 baa6338a37e..00000000000 --- 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 39249ee4718..0d4ba99c45f 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 ad85bf2a778..00000000000 --- 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 ee8fdc16a06..723b6f3111c 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 142092ff41e..b053f8e7d80 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 1f5a41fce96..00000000000 --- 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 0fe56584822..74c855476f2 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 03998af50c2..00000000000 --- 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 37a00746a88..e8e82ee8fda 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 afa8f15ee57..d4d1d28a137 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 c77b5cc8303..00000000000 --- 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 a39c500225b..6059f2b82c1 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 1f3cd00fb48..00000000000 --- 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 406aadcd212..57af617c5ff 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 e757c7f3a44..00000000000 --- 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/lint/lint-output-format-2.rs b/src/test/ui/lint/lint-output-format-2.rs index e87ddde7413..d29019309ab 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 8c6247688e8..a5718fd74b3 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 de2c27bdcbc..459eaa14737 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 afebb4f36a4..a763a994a88 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 f7cf8a68d56..c5fea3cd6ca 100644 --- a/src/test/ui/lint/lint-type-overflow2.rs +++ b/src/test/ui/lint/lint-type-overflow2.rs @@ -11,11 +11,11 @@ #![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 ecfd2584bba..78dd282c88d 100644 --- a/src/test/ui/lint/lint-type-overflow2.stderr +++ b/src/test/ui/lint/lint-type-overflow2.stderr @@ -34,17 +34,21 @@ 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 | | } - | |_^ +warning: attempt to negate with overflow + --> $DIR/lint-type-overflow2.rs:19:18 + | +LL | let x2: i8 = --128; //~ warn: literal out of range for i8 + | ^^^^^ + | +note: lint level defined here + --> $DIR/lint-type-overflow2.rs:13:9 + | +LL | #![warn(const_err)] + | ^^^^^^^^^ -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 diff --git a/src/test/ui/lint/lint-unknown-feature-default.rs b/src/test/ui/lint/lint-unknown-feature-default.rs index 5a0568f05e6..cfab640ad4e 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 bd4079ffd2e..00000000000 --- 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 81f99f99492..7c5878e1729 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 e2744c03872..00000000000 --- 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 b273e7a0c7c..42b4a72a46c 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 41b4a850f1b..442f1918bd1 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::<i32> { 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 ad24f69871c..63cb947b49b 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 d0cb81544f8..7d556f4f227 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::<i32> { 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 74da125d575..56f8288fa2f 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 af524d5b017..d7d3cdb78e1 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 077e57c9579..09b2c24e2a6 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 999cfb9cc3c..ac5c59c044a 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<for <'a> 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 4afb61ab76c..fa3737d6911 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 3ef0275cfbe..00000000000 --- 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 8f46d3301eb..a1d77515f29 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 ef6210bb6f7..00000000000 --- 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 7255e7d00b6..90ac95d54d7 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 b7551c1bd93..00000000000 --- 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 9d389413ba9..b594085333b 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 2e81750d43b..00000000000 --- 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 f10526200ff..8ba6863167b 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<T>(*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 d60e4cdffb4..00000000000 --- 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 a9505e4f936..43a18fba9b8 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::<u16>(); } -#[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 2848ff88c17..00000000000 --- 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 bbc958b87a5..219f68877be 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 b4427565a86..c294e3eaf9c 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 0fb75b535c6..0762e872072 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 7c7126c93c6..a4fd7b1b296 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 2940b891534..891512c9653 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 91a90266e5e..00000000000 --- 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 5a8772d6142..6ec2ecba8cf 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:Quux>(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 61259641c0e..00000000000 --- 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 518c45ac9df..34b66b15e57 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: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 645867f4606..00000000000 --- 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/privacy/restricted/lookup-ignores-private.rs b/src/test/ui/privacy/restricted/lookup-ignores-private.rs index abd71b9c90b..1eda959e3f6 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 7fc53e8c324..00000000000 --- 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 630969bdbdf..24a1bcb37cf 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<usize>); -#[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 cf8ae671ffc..00000000000 --- 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 5963c4a9496..033f06f9cd1 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 eadb3a08ba0..00000000000 --- 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 871b55b85cf..23fb0a1fc5e 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<usize>); -#[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 516667a11cd..00000000000 --- 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 c1df057b396..00ca2c7da67 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 585ccf465d8..00000000000 --- 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 3115e5a9a43..ff1b74fa020 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 ce9dd59bbf5..00000000000 --- 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 1e615be9d6a..36c87b729d8 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 39deed32c76..00000000000 --- 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 84dd97643a1..d7bfb735e00 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 9431e8f5291..00000000000 --- 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 b3037a1e187..09e1634381f 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 7a38797e469..00000000000 --- 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 a2e6de21376..be1987fe87c 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 1a12697a474..00000000000 --- 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 b8582f8c26b..d0560d4cd90 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 85b1702e2a0..00000000000 --- 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-hrtype.rs b/src/test/ui/regions/regions-outlives-projection-hrtype.rs index 2d271b7be73..d6d4e2b0529 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::< <FnType<T> 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 ba4e318957e..00000000000 --- 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 04682a77297..b05788dc413 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 `<F as Foo<'a>>::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 0a4cbe64d46..00000000000 --- 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 94f7a350cf7..a203ebd919d 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 d754bdd6032..00000000000 --- 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/span/issue-24690.rs b/src/test/ui/span/issue-24690.rs index 041ca6c426c..b19461b03a0 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 b496a1a76c0..723b7e2c0aa 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 5f9e8ba6c0a..85001fc0ff6 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 d38e869df8f..00000000000 --- 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 80d2884ee60..2f694e3ca7c 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<B> Async for Complete<B> { fn foo(_: Receipt<Complete<()>>) { } -#[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 3c26e426a4e..00000000000 --- 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 df340095bb4..2c0690881a1 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<u32, Void>) -> Result<u32, i32> { 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 a8a0ed3d03b..1916174142f 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-use-contravariant-struct-2.rs b/src/test/ui/variance/variance-use-contravariant-struct-2.rs index b38fd0e9ffc..88585373847 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<T>(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 e3663eb0345..00000000000 --- 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 d8e1a5f5f1c..245e21511a6 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>(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 9c3a1cf1cc2..00000000000 --- 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 - |
