diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-12-24 23:08:28 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-12-25 16:00:47 +1100 |
| commit | 5e98118901e9d358cc246e3fabe119bcd6a245bc (patch) | |
| tree | 81254c83952b2bfab1aabf556ec7a570c55bb05b | |
| parent | d4005b68119701c36a7930320b51d3666750020a (diff) | |
| download | rust-5e98118901e9d358cc246e3fabe119bcd6a245bc.tar.gz rust-5e98118901e9d358cc246e3fabe119bcd6a245bc.zip | |
Fully redact the [E0788] error message in tests, to make changes easier
| -rw-r--r-- | tests/ui/coverage-attr/allowed-positions.rs | 24 | ||||
| -rw-r--r-- | tests/ui/coverage-attr/name-value.rs | 14 | ||||
| -rw-r--r-- | tests/ui/coverage-attr/word-only.rs | 14 |
3 files changed, 26 insertions, 26 deletions
diff --git a/tests/ui/coverage-attr/allowed-positions.rs b/tests/ui/coverage-attr/allowed-positions.rs index bfffbd26250..3c400761948 100644 --- a/tests/ui/coverage-attr/allowed-positions.rs +++ b/tests/ui/coverage-attr/allowed-positions.rs @@ -8,20 +8,20 @@ #![warn(unused_attributes)] #![coverage(off)] -#[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure +#[coverage(off)] //~ ERROR [E0788] trait Trait { - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] const X: u32; - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] type T; type U; - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] fn f(&self); - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] fn g(); } @@ -29,10 +29,10 @@ trait Trait { impl Trait for () { const X: u32 = 0; - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] type T = Self; - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] type U = impl Trait; //~ ERROR unconstrained opaque type fn f(&self) {} @@ -40,23 +40,23 @@ impl Trait for () { } extern "C" { - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] static X: u32; - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] type T; } #[coverage(off)] fn main() { - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] let _ = (); match () { - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] () => (), } - #[coverage(off)] //~ ERROR attribute should be applied to a function definition or closure + #[coverage(off)] //~ ERROR [E0788] return (); } diff --git a/tests/ui/coverage-attr/name-value.rs b/tests/ui/coverage-attr/name-value.rs index e5df5bc3da0..ffd9afe2ce1 100644 --- a/tests/ui/coverage-attr/name-value.rs +++ b/tests/ui/coverage-attr/name-value.rs @@ -20,7 +20,7 @@ mod my_mod_inner { #[coverage = "off"] //~^ ERROR malformed `coverage` attribute input -//~| ERROR attribute should be applied to a function definition or closure +//~| ERROR [E0788] struct MyStruct; #[coverage = "off"] @@ -28,22 +28,22 @@ struct MyStruct; impl MyStruct { #[coverage = "off"] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] const X: u32 = 7; } #[coverage = "off"] //~^ ERROR malformed `coverage` attribute input -//~| ERROR attribute should be applied to a function definition or closure +//~| ERROR [E0788] trait MyTrait { #[coverage = "off"] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] const X: u32; #[coverage = "off"] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] type T; } @@ -52,12 +52,12 @@ trait MyTrait { impl MyTrait for MyStruct { #[coverage = "off"] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] const X: u32 = 8; #[coverage = "off"] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] type T = (); } diff --git a/tests/ui/coverage-attr/word-only.rs b/tests/ui/coverage-attr/word-only.rs index add225cdb93..d0f743938f3 100644 --- a/tests/ui/coverage-attr/word-only.rs +++ b/tests/ui/coverage-attr/word-only.rs @@ -20,7 +20,7 @@ mod my_mod_inner { #[coverage] //~^ ERROR malformed `coverage` attribute input -//~| ERROR attribute should be applied to a function definition or closure +//~| ERROR [E0788] struct MyStruct; #[coverage] @@ -28,22 +28,22 @@ struct MyStruct; impl MyStruct { #[coverage] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] const X: u32 = 7; } #[coverage] //~^ ERROR malformed `coverage` attribute input -//~| ERROR attribute should be applied to a function definition or closure +//~| ERROR [E0788] trait MyTrait { #[coverage] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] const X: u32; #[coverage] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] type T; } @@ -52,12 +52,12 @@ trait MyTrait { impl MyTrait for MyStruct { #[coverage] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] const X: u32 = 8; #[coverage] //~^ ERROR malformed `coverage` attribute input - //~| ERROR attribute should be applied to a function definition or closure + //~| ERROR [E0788] type T = (); } |
