UI tests: add missing diagnostic kinds where possible

This commit is contained in:
Vadim Petrochenkov 2025-04-05 19:19:56 +03:00
parent d4f880f8ce
commit b3f75353a2
370 changed files with 930 additions and 928 deletions

View file

@ -1,24 +1,24 @@
//@ compile-flags: -Zdeduplicate-diagnostics=yes
extern crate rustc_data_structures;
//~^ use of unstable library feature `rustc_private`
//~^ ERROR use of unstable library feature `rustc_private`
//~| NOTE: issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
extern crate rustc_macros;
//~^ use of unstable library feature `rustc_private`
//~^ ERROR use of unstable library feature `rustc_private`
//~| NOTE: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
extern crate rustc_query_system;
//~^ use of unstable library feature `rustc_private`
//~^ ERROR use of unstable library feature `rustc_private`
//~| NOTE: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
use rustc_macros::HashStable;
//~^ use of unstable library feature `rustc_private`
//~^ ERROR use of unstable library feature `rustc_private`
//~| NOTE: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
#[derive(HashStable)]
//~^ use of unstable library feature `rustc_private`
//~^ ERROR use of unstable library feature `rustc_private`
//~| NOTE: in this expansion of #[derive(HashStable)]
//~| NOTE: in this expansion of #[derive(HashStable)]
//~| NOTE: in this expansion of #[derive(HashStable)]

View file

@ -8,17 +8,17 @@ extern crate rustc_macros;
use rustc_macros::TryFromU32;
#[derive(TryFromU32)]
struct MyStruct {} //~ type is not an enum
struct MyStruct {} //~ ERROR type is not an enum
#[derive(TryFromU32)]
enum NonTrivial {
A,
B(),
C {},
D(bool), //~ enum variant cannot have fields
E(bool, bool), //~ enum variant cannot have fields
F { x: bool }, //~ enum variant cannot have fields
G { x: bool, y: bool }, //~ enum variant cannot have fields
D(bool), //~ ERROR enum variant cannot have fields
E(bool, bool), //~ ERROR enum variant cannot have fields
F { x: bool }, //~ ERROR enum variant cannot have fields
G { x: bool, y: bool }, //~ ERROR enum variant cannot have fields
}
fn main() {}