Skip to content

Commit b3f7535

Browse files
committed
UI tests: add missing diagnostic kinds where possible
1 parent d4f880f commit b3f7535

File tree

370 files changed

+930
-928
lines changed

Some content is hidden

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

370 files changed

+930
-928
lines changed

tests/rustdoc-ui/invalid-syntax.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub fn baz() {}
4747
///
4848
/// Indented block end
4949
pub fn quux() {}
50-
//~^^^^^ could not parse code block as Rust code
50+
//~^^^^^ WARN could not parse code block as Rust code
5151

5252
/// Unclosed fence
5353
///

tests/rustdoc-ui/issues/ice-generic-type-alias-105742.rs

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,63 @@ use std::ops::Index;
55
pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
66
//~^ expected 1 lifetime argument
77
//~| expected 1 generic argument
8-
//~| the trait `SVec` is not dyn compatible
8+
//~| ERROR the trait `SVec` is not dyn compatible
99
//~| `SVec` is not dyn compatible
10-
//~| missing generics for associated type `SVec::Item`
11-
//~| missing generics for associated type `SVec::Item`
10+
//~| ERROR missing generics for associated type `SVec::Item`
11+
//~| ERROR missing generics for associated type `SVec::Item`
1212
let _ = s;
1313
}
1414

1515
pub trait SVec: Index<
1616
<Self as SVec>::Item,
1717
//~^ expected 1 lifetime argument
1818
//~| expected 1 generic argument
19-
//~| missing generics for associated type `SVec::Item`
20-
//~| missing generics for associated type `SVec::Item`
21-
//~| missing generics for associated type `SVec::Item`
22-
//~| missing generics for associated type `SVec::Item`
23-
//~| missing generics for associated type `SVec::Item`
24-
//~| missing generics for associated type `SVec::Item`
25-
//~| missing generics for associated type `SVec::Item`
26-
//~| missing generics for associated type `SVec::Item`
19+
//~| ERROR missing generics for associated type `SVec::Item`
20+
//~| ERROR missing generics for associated type `SVec::Item`
21+
//~| ERROR missing generics for associated type `SVec::Item`
22+
//~| ERROR missing generics for associated type `SVec::Item`
23+
//~| ERROR missing generics for associated type `SVec::Item`
24+
//~| ERROR missing generics for associated type `SVec::Item`
25+
//~| ERROR missing generics for associated type `SVec::Item`
26+
//~| ERROR missing generics for associated type `SVec::Item`
2727
Output = <Index<<Self as SVec>::Item,
2828
//~^ expected 1 lifetime argument
2929
//~| expected 1 generic argument
30-
//~| missing generics for associated type `SVec::Item`
31-
//~| missing generics for associated type `SVec::Item`
32-
//~| missing generics for associated type `SVec::Item`
33-
//~| missing generics for associated type `SVec::Item`
34-
//~| missing generics for associated type `SVec::Item`
35-
//~| missing generics for associated type `SVec::Item`
36-
//~| missing generics for associated type `SVec::Item`
37-
//~| missing generics for associated type `SVec::Item`
30+
//~| ERROR missing generics for associated type `SVec::Item`
31+
//~| ERROR missing generics for associated type `SVec::Item`
32+
//~| ERROR missing generics for associated type `SVec::Item`
33+
//~| ERROR missing generics for associated type `SVec::Item`
34+
//~| ERROR missing generics for associated type `SVec::Item`
35+
//~| ERROR missing generics for associated type `SVec::Item`
36+
//~| ERROR missing generics for associated type `SVec::Item`
37+
//~| ERROR missing generics for associated type `SVec::Item`
3838
Output = <Self as SVec>::Item> as SVec>::Item,
3939
//~^ expected 1 lifetime argument
4040
//~| expected 1 generic argument
4141
//~| expected 1 lifetime argument
42-
//~| missing generics for associated type `SVec::Item`
43-
//~| missing generics for associated type `SVec::Item`
44-
//~| missing generics for associated type `SVec::Item`
45-
//~| missing generics for associated type `SVec::Item`
46-
//~| missing generics for associated type `SVec::Item`
47-
//~| missing generics for associated type `SVec::Item`
42+
//~| ERROR missing generics for associated type `SVec::Item`
43+
//~| ERROR missing generics for associated type `SVec::Item`
44+
//~| ERROR missing generics for associated type `SVec::Item`
45+
//~| ERROR missing generics for associated type `SVec::Item`
46+
//~| ERROR missing generics for associated type `SVec::Item`
47+
//~| ERROR missing generics for associated type `SVec::Item`
4848
//~| expected 1 generic argument
49-
//~| missing generics for associated type `SVec::Item`
50-
//~| missing generics for associated type `SVec::Item`
51-
//~| missing generics for associated type `SVec::Item`
52-
//~| missing generics for associated type `SVec::Item`
53-
//~| missing generics for associated type `SVec::Item`
54-
//~| missing generics for associated type `SVec::Item`
55-
//~| missing generics for associated type `SVec::Item`
56-
//~| missing generics for associated type `SVec::Item`
57-
//~| missing generics for associated type `SVec::Item`
58-
//~| missing generics for associated type `SVec::Item`
49+
//~| ERROR missing generics for associated type `SVec::Item`
50+
//~| ERROR missing generics for associated type `SVec::Item`
51+
//~| ERROR missing generics for associated type `SVec::Item`
52+
//~| ERROR missing generics for associated type `SVec::Item`
53+
//~| ERROR missing generics for associated type `SVec::Item`
54+
//~| ERROR missing generics for associated type `SVec::Item`
55+
//~| ERROR missing generics for associated type `SVec::Item`
56+
//~| ERROR missing generics for associated type `SVec::Item`
57+
//~| ERROR missing generics for associated type `SVec::Item`
58+
//~| ERROR missing generics for associated type `SVec::Item`
5959
> {
6060
type Item<'a, T>;
6161

6262
fn len(&self) -> <Self as SVec>::Item;
6363
//~^ expected 1 lifetime argument
64-
//~| missing generics for associated type `SVec::Item`
64+
//~| ERROR missing generics for associated type `SVec::Item`
6565
//~| expected 1 generic argument
66-
//~| missing generics for associated type `SVec::Item`
66+
//~| ERROR missing generics for associated type `SVec::Item`
6767
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// https://github.com/rust-lang/rust/issues/102986
22
struct Struct {
33
y: (typeof("hey"),),
4-
//~^ `typeof` is a reserved keyword but unimplemented
4+
//~^ ERROR `typeof` is a reserved keyword but unimplemented
55
}

tests/ui-fulldeps/hash-stable-is-unstable.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
//@ compile-flags: -Zdeduplicate-diagnostics=yes
22
extern crate rustc_data_structures;
3-
//~^ use of unstable library feature `rustc_private`
3+
//~^ ERROR use of unstable library feature `rustc_private`
44
//~| NOTE: issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
55
//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
66
extern crate rustc_macros;
7-
//~^ use of unstable library feature `rustc_private`
7+
//~^ ERROR use of unstable library feature `rustc_private`
88
//~| NOTE: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
99
//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010
extern crate rustc_query_system;
11-
//~^ use of unstable library feature `rustc_private`
11+
//~^ ERROR use of unstable library feature `rustc_private`
1212
//~| NOTE: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
1313
//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1414

1515
use rustc_macros::HashStable;
16-
//~^ use of unstable library feature `rustc_private`
16+
//~^ ERROR use of unstable library feature `rustc_private`
1717
//~| NOTE: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
1818
//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1919

2020
#[derive(HashStable)]
21-
//~^ use of unstable library feature `rustc_private`
21+
//~^ ERROR use of unstable library feature `rustc_private`
2222
//~| NOTE: in this expansion of #[derive(HashStable)]
2323
//~| NOTE: in this expansion of #[derive(HashStable)]
2424
//~| NOTE: in this expansion of #[derive(HashStable)]

tests/ui-fulldeps/try-from-u32/errors.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ extern crate rustc_macros;
88
use rustc_macros::TryFromU32;
99

1010
#[derive(TryFromU32)]
11-
struct MyStruct {} //~ type is not an enum
11+
struct MyStruct {} //~ ERROR type is not an enum
1212

1313
#[derive(TryFromU32)]
1414
enum NonTrivial {
1515
A,
1616
B(),
1717
C {},
18-
D(bool), //~ enum variant cannot have fields
19-
E(bool, bool), //~ enum variant cannot have fields
20-
F { x: bool }, //~ enum variant cannot have fields
21-
G { x: bool, y: bool }, //~ enum variant cannot have fields
18+
D(bool), //~ ERROR enum variant cannot have fields
19+
E(bool, bool), //~ ERROR enum variant cannot have fields
20+
F { x: bool }, //~ ERROR enum variant cannot have fields
21+
G { x: bool, y: bool }, //~ ERROR enum variant cannot have fields
2222
}
2323

2424
fn main() {}

tests/ui/abi/simd-abi-checks-avx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ use std::arch::x86_64::*;
1414
struct Wrapper(__m256);
1515

1616
unsafe extern "C" fn w(_: Wrapper) {
17-
//~^ requires the `avx` target feature, which is not enabled
17+
//~^ WARN requires the `avx` target feature, which is not enabled
1818
//~| WARNING this was previously accepted by the compiler
1919
todo!()
2020
}
2121

2222
unsafe extern "C" fn f(_: __m256) {
23-
//~^ requires the `avx` target feature, which is not enabled
23+
//~^ WARN requires the `avx` target feature, which is not enabled
2424
//~| WARNING this was previously accepted by the compiler
2525
todo!()
2626
}
2727

2828
unsafe extern "C" fn g() -> __m256 {
29-
//~^ requires the `avx` target feature, which is not enabled
29+
//~^ WARN requires the `avx` target feature, which is not enabled
3030
//~| WARNING this was previously accepted by the compiler
3131
todo!()
3232
}

tests/ui/abi/simd-abi-checks-empty-list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ use minicore::*;
1414
pub struct SimdVec([i32; 4]);
1515

1616
pub extern "C" fn pass_by_vec(_: SimdVec) {}
17-
//~^ this function definition uses SIMD vector type `SimdVec` which is not currently supported with the chosen ABI
17+
//~^ WARN this function definition uses SIMD vector type `SimdVec` which is not currently supported with the chosen ABI
1818
//~| WARNING this was previously accepted by the compiler

tests/ui/abi/simd-abi-checks-sse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ pub struct SseVector([i64; 2]);
1818

1919
#[no_mangle]
2020
pub unsafe extern "C" fn f(_: SseVector) {
21-
//~^ this function definition uses SIMD vector type `SseVector` which (with the chosen ABI) requires the `sse` target feature, which is not enabled
21+
//~^ WARN this function definition uses SIMD vector type `SseVector` which (with the chosen ABI) requires the `sse` target feature, which is not enabled
2222
//~| WARNING this was previously accepted by the compiler
2323
}

tests/ui/abi/vectorcall-abi-checks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ use minicore::*;
1111

1212
#[no_mangle]
1313
pub extern "vectorcall" fn f() {
14-
//~^ ABI "vectorcall" which requires the `sse2` target feature
14+
//~^ ERROR ABI "vectorcall" which requires the `sse2` target feature
1515
}
1616

1717
#[no_mangle]
1818
pub fn call_site() {
1919
f();
20-
//~^ ABI "vectorcall" which requires the `sse2` target feature
20+
//~^ ERROR ABI "vectorcall" which requires the `sse2` target feature
2121
}

tests/ui/anon-params/anon-params-denied-2018.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@ edition:2018
44

55
trait T {
6-
fn foo(i32); //~ expected one of `:`, `@`, or `|`, found `)`
6+
fn foo(i32); //~ ERROR expected one of `:`, `@`, or `|`, found `)`
77

88
// Also checks with `&`
99
fn foo_with_ref(&mut i32);

0 commit comments

Comments
 (0)