Skip to content

Commit a2e0906

Browse files
committed
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.)
1 parent 0332a39 commit a2e0906

File tree

190 files changed

+362
-1213
lines changed

Some content is hidden

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

190 files changed

+362
-1213
lines changed

src/test/ui/asm/asm-misplaced-option.rs

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

24-
#![feature(asm, rustc_attrs)]
25-
24+
// compile-pass
25+
// skip-codegen
26+
#![feature(asm)]
2627
#![allow(dead_code, non_upper_case_globals)]
2728

2829
#[cfg(any(target_arch = "x86",
2930
target_arch = "x86_64"))]
30-
#[rustc_error]
31-
pub fn main() { //~ ERROR compilation successful
31+
pub fn main() {
3232
// assignment not dead
3333
let mut x: isize = 0;
3434
unsafe {

src/test/ui/asm/asm-misplaced-option.stderr

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,3 @@ warning: expected a clobber, found an option
1010
LL | asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
1111
| ^^^^^^^^^^
1212

13-
error: compilation successful
14-
--> $DIR/asm-misplaced-option.rs:31:1
15-
|
16-
LL | / pub fn main() { //~ ERROR compilation successful
17-
LL | | // assignment not dead
18-
LL | | let mut x: isize = 0;
19-
LL | | unsafe {
20-
... |
21-
LL | | assert_eq!(x, 13);
22-
LL | | }
23-
| |_^
24-
25-
error: aborting due to previous error
26-

src/test/ui/associated-types/cache/chrono-scan.rs

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

11-
#![feature(rustc_attrs)]
11+
// compile-pass
12+
// skip-codegen
1213
#![allow(warnings)]
13-
1414
pub type ParseResult<T> = Result<T, ()>;
1515

1616
pub enum Item<'a> { Literal(&'a str),
@@ -35,5 +35,5 @@ pub fn parse<'a, I>(mut s: &str, items: I) -> ParseResult<()>
3535
Ok(())
3636
}
3737

38-
#[rustc_error]
39-
fn main() { } //~ ERROR compilation successful
38+
39+
fn main() { }

src/test/ui/associated-types/cache/chrono-scan.stderr

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/test/ui/associated-types/cache/elision.rs

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

11-
#![feature(rustc_attrs)]
11+
// compile-pass
12+
// skip-codegen
1213
#![allow(warnings)]
13-
1414
// Check that you are allowed to implement using elision but write
1515
// trait without elision (a bug in this cropped up during
1616
// bootstrapping, so this is a regression test).
@@ -30,5 +30,5 @@ impl UnicodeStr for str {
3030
}
3131
}
3232

33-
#[rustc_error]
34-
fn main() { } //~ ERROR compilation successful
33+
34+
fn main() { }

src/test/ui/associated-types/cache/elision.stderr

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/test/ui/bad/bad-lint-cap3.rs

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

1313
#![warn(unused)]
1414
#![deny(warnings)]
15-
#![feature(rustc_attrs)]
16-
15+
// compile-pass
16+
// skip-codegen
1717
use std::option; //~ WARN
1818

19-
#[rustc_error]
20-
fn main() {} //~ ERROR: compilation successful
19+
20+
fn main() {}
2121

src/test/ui/bad/bad-lint-cap3.stderr

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,3 @@ LL | #![deny(warnings)]
1111
| ^^^^^^^^
1212
= note: #[warn(unused_imports)] implied by #[warn(warnings)]
1313

14-
error: compilation successful
15-
--> $DIR/bad-lint-cap3.rs:20:1
16-
|
17-
LL | fn main() {} //~ ERROR: compilation successful
18-
| ^^^^^^^^^^^^
19-
20-
error: aborting due to previous error
21-

src/test/ui/coherence/coherence-projection-ok-orphan.rs

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

11-
#![feature(rustc_attrs)]
11+
// compile-pass
12+
// skip-codegen
1213
#![allow(dead_code)]
13-
1414
// Here we do not get a coherence conflict because `Baz: Iterator`
1515
// does not hold and (due to the orphan rules), we can rely on that.
1616

@@ -25,5 +25,5 @@ impl Foo<i32> for Baz { }
2525

2626
impl<A:Iterator> Foo<A::Item> for A { }
2727

28-
#[rustc_error]
29-
fn main() {} //~ ERROR compilation successful
28+
29+
fn main() {}

src/test/ui/coherence/coherence-projection-ok-orphan.stderr

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)