Skip to content

Commit 653da4f

Browse files
committed
Auto merge of #55532 - pnkfelix:rustc_error-survey, r=nikomatsakis
#[rustc_error] survey Fix #55505
2 parents 1d83455 + f4da71e commit 653da4f

File tree

233 files changed

+449
-1312
lines changed

Some content is hidden

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

233 files changed

+449
-1312
lines changed

Diff for: src/test/ui/asm/asm-bad-clobber.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
// ignore-mips
2222
// ignore-mips64
2323

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

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

Diff for: src/test/ui/asm/asm-misplaced-option.rs

+4-4
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 {

Diff for: src/test/ui/asm/asm-misplaced-option.stderr

-14
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-

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

+4-4
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() { }

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

-8
This file was deleted.

Diff for: src/test/ui/associated-types/cache/elision.rs

+4-4
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() { }

Diff for: src/test/ui/associated-types/cache/elision.stderr

-8
This file was deleted.

Diff for: src/test/ui/bad/bad-lint-cap3.rs

+4-4
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

Diff for: src/test/ui/bad/bad-lint-cap3.stderr

-8
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-

Diff for: src/test/ui/coherence/coherence-projection-ok-orphan.rs

+4-4
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() {}

Diff for: src/test/ui/coherence/coherence-projection-ok-orphan.stderr

-8
This file was deleted.

Diff for: src/test/ui/coherence/coherence-projection-ok.rs

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

11-
#![feature(rustc_attrs)]
12-
11+
// compile-pass
12+
// skip-codegen
1313
pub trait Foo<P> {}
1414

1515
pub trait Bar {
@@ -24,5 +24,5 @@ impl Bar for i32 {
2424
type Output = u32;
2525
}
2626

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

Diff for: src/test/ui/coherence/coherence-projection-ok.stderr

-8
This file was deleted.

Diff for: src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// `MyType: !MyTrait` along with other "fundamental" wrappers.
1313

1414
// aux-build:coherence_copy_like_lib.rs
15-
16-
#![feature(rustc_attrs)]
15+
// compile-pass
16+
// skip-codgen
1717
#![allow(dead_code)]
1818

1919
extern crate coherence_copy_like_lib as lib;
@@ -30,5 +30,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
3030
// Huzzah.
3131
impl MyTrait for lib::MyFundamentalStruct<MyType> { }
3232

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

Diff for: src/test/ui/coherence/coherence_copy_like_err_fundamental_struct.stderr

-8
This file was deleted.

Diff for: src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// `MyType: !MyTrait` along with other "fundamental" wrappers.
1313

1414
// aux-build:coherence_copy_like_lib.rs
15-
16-
#![feature(rustc_attrs)]
15+
// compile-pass
16+
// skip-codegen
1717
#![allow(dead_code)]
1818

1919
extern crate coherence_copy_like_lib as lib;
@@ -30,5 +30,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
3030
// Huzzah.
3131
impl<'a> MyTrait for lib::MyFundamentalStruct<&'a MyType> { }
3232

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

Diff for: src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_ref.stderr

-8
This file was deleted.

Diff for: src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// aux-build:coherence_copy_like_lib.rs
1515

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

1818
extern crate coherence_copy_like_lib as lib;
1919

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

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

Diff for: src/test/ui/coherence/coherence_local.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// `MyType: !MyTrait` along with other "fundamental" wrappers.
1313

1414
// aux-build:coherence_copy_like_lib.rs
15-
16-
#![feature(rustc_attrs)]
15+
// compile-pass
16+
// skip-codegen
1717
#![allow(dead_code)]
1818

1919
extern crate coherence_copy_like_lib as lib;
@@ -29,5 +29,5 @@ impl lib::MyCopy for Box<MyType> { }
2929
impl lib::MyCopy for lib::MyFundamentalStruct<MyType> { }
3030
impl lib::MyCopy for lib::MyFundamentalStruct<Box<MyType>> { }
3131

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

Diff for: src/test/ui/coherence/coherence_local.stderr

-8
This file was deleted.

Diff for: src/test/ui/coherence/coherence_local_err_struct.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// aux-build:coherence_copy_like_lib.rs
1515

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

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

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

Diff for: src/test/ui/coherence/coherence_local_err_tuple.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// aux-build:coherence_copy_like_lib.rs
1515

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

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

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

Diff for: src/test/ui/coherence/coherence_local_ref.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// `MyType: !MyTrait` along with other "fundamental" wrappers.
1313

1414
// aux-build:coherence_copy_like_lib.rs
15-
16-
#![feature(rustc_attrs)]
15+
// compile-pass
16+
// skip-codegen
1717
#![allow(dead_code)]
1818

1919
extern crate coherence_copy_like_lib as lib;
@@ -23,5 +23,5 @@ struct MyType { x: i32 }
2323
// naturally, legal
2424
impl lib::MyCopy for MyType { }
2525

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

Diff for: src/test/ui/coherence/coherence_local_ref.stderr

-8
This file was deleted.

Diff for: src/test/ui/conditional-compilation/cfg_attr_path.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
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)]
1314
#![deny(unused_attributes)] // c.f #35584
14-
1515
mod auxiliary {
1616
#[cfg_attr(any(), path = "nonexistent_file.rs")] pub mod namespaced_enums;
1717
#[cfg_attr(all(), path = "namespaced_enums.rs")] pub mod nonexistent_file;
1818
}
1919

20-
#[rustc_error]
21-
fn main() { //~ ERROR compilation successful
20+
21+
fn main() {
2222
let _ = auxiliary::namespaced_enums::Foo::A;
2323
let _ = auxiliary::nonexistent_file::Foo::A;
2424
}

Diff for: src/test/ui/conditional-compilation/cfg_attr_path.stderr

-11
This file was deleted.

0 commit comments

Comments
 (0)