diff options
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/conflicting-repr-hints.rs | 35 | ||||
| -rw-r--r-- | src/test/ui/conflicting-repr-hints.stderr | 35 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-repr-simd.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-repr-simd.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-14221.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-19100.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-30302.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-39720.rs | 10 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-39720.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-47094.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-47094.stderr | 15 | ||||
| -rw-r--r-- | src/test/ui/lint/lint-uppercase-variables.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr | 2 |
13 files changed, 69 insertions, 64 deletions
diff --git a/src/test/ui/conflicting-repr-hints.rs b/src/test/ui/conflicting-repr-hints.rs index cc986b25219..8e9c11690a8 100644 --- a/src/test/ui/conflicting-repr-hints.rs +++ b/src/test/ui/conflicting-repr-hints.rs @@ -1,16 +1,24 @@ #![allow(dead_code)] #[repr(C)] -enum A { A } +enum A { + A, +} #[repr(u64)] -enum B { B } +enum B { + B, +} -#[repr(C, u64)] //~ WARNING conflicting representation hints -enum C { C } +#[repr(C, u64)] //~ ERROR conflicting representation hints +enum C { + C, +} -#[repr(u32, u64)] //~ WARNING conflicting representation hints -enum D { D } +#[repr(u32, u64)] //~ ERROR conflicting representation hints +enum D { + D, +} #[repr(C, packed)] struct E(i32); @@ -37,20 +45,23 @@ struct J(i32); //~ ERROR type has conflicting packed representation hints struct K(i32); #[repr(packed, align(8))] -union X { //~ ERROR type has conflicting packed and align representation hints - i: i32 +union X { + //~^ ERROR type has conflicting packed and align representation hints + i: i32, } #[repr(packed)] #[repr(align(8))] -union Y { //~ ERROR type has conflicting packed and align representation hints - i: i32 +union Y { + //~^ ERROR type has conflicting packed and align representation hints + i: i32, } #[repr(align(8))] #[repr(packed)] -union Z { //~ ERROR type has conflicting packed and align representation hints - i: i32 +union Z { + //~^ ERROR type has conflicting packed and align representation hints + i: i32, } fn main() {} diff --git a/src/test/ui/conflicting-repr-hints.stderr b/src/test/ui/conflicting-repr-hints.stderr index 414c15f93bc..0dfe360dbb3 100644 --- a/src/test/ui/conflicting-repr-hints.stderr +++ b/src/test/ui/conflicting-repr-hints.stderr @@ -1,70 +1,73 @@ -warning[E0566]: conflicting representation hints - --> $DIR/conflicting-repr-hints.rs:9:8 +error[E0566]: conflicting representation hints + --> $DIR/conflicting-repr-hints.rs:13:8 | LL | #[repr(C, u64)] | ^ ^^^ -warning[E0566]: conflicting representation hints - --> $DIR/conflicting-repr-hints.rs:12:8 +error[E0566]: conflicting representation hints + --> $DIR/conflicting-repr-hints.rs:18:8 | LL | #[repr(u32, u64)] | ^^^ ^^^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:19:1 + --> $DIR/conflicting-repr-hints.rs:27:1 | LL | struct F(i32); | ^^^^^^^^^^^^^^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:23:1 + --> $DIR/conflicting-repr-hints.rs:31:1 | LL | struct G(i32); | ^^^^^^^^^^^^^^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:27:1 + --> $DIR/conflicting-repr-hints.rs:35:1 | LL | struct H(i32); | ^^^^^^^^^^^^^^ error[E0634]: type has conflicting packed representation hints - --> $DIR/conflicting-repr-hints.rs:30:1 + --> $DIR/conflicting-repr-hints.rs:38:1 | LL | struct I(i32); | ^^^^^^^^^^^^^^ error[E0634]: type has conflicting packed representation hints - --> $DIR/conflicting-repr-hints.rs:34:1 + --> $DIR/conflicting-repr-hints.rs:42:1 | LL | struct J(i32); | ^^^^^^^^^^^^^^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:40:1 + --> $DIR/conflicting-repr-hints.rs:48:1 | LL | / union X { -LL | | i: i32 +LL | | +LL | | i: i32, LL | | } | |_^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:46:1 + --> $DIR/conflicting-repr-hints.rs:55:1 | LL | / union Y { -LL | | i: i32 +LL | | +LL | | i: i32, LL | | } | |_^ error[E0587]: type has conflicting packed and align representation hints - --> $DIR/conflicting-repr-hints.rs:52:1 + --> $DIR/conflicting-repr-hints.rs:62:1 | LL | / union Z { -LL | | i: i32 +LL | | +LL | | i: i32, LL | | } | |_^ -error: aborting due to 8 previous errors +error: aborting due to 10 previous errors Some errors have detailed explanations: E0566, E0587. For more information about an error, try `rustc --explain E0566`. diff --git a/src/test/ui/feature-gates/feature-gate-repr-simd.rs b/src/test/ui/feature-gates/feature-gate-repr-simd.rs index 9d28f437415..1e4a404fa25 100644 --- a/src/test/ui/feature-gates/feature-gate-repr-simd.rs +++ b/src/test/ui/feature-gates/feature-gate-repr-simd.rs @@ -1,7 +1,7 @@ #[repr(simd)] //~ error: SIMD types are experimental struct Foo(u64, u64); -#[repr(C)] //~ warn: conflicting representation hints +#[repr(C)] //~ ERROR conflicting representation hints #[repr(simd)] //~ error: SIMD types are experimental struct Bar(u64, u64); diff --git a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr index 02c8400e03e..37a7bd0b129 100644 --- a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr +++ b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr @@ -16,7 +16,7 @@ LL | #[repr(simd)] = note: for more information, see https://github.com/rust-lang/rust/issues/27731 = help: add `#![feature(repr_simd)]` to the crate attributes to enable -warning[E0566]: conflicting representation hints +error[E0566]: conflicting representation hints --> $DIR/feature-gate-repr-simd.rs:4:8 | LL | #[repr(C)] @@ -24,7 +24,7 @@ LL | #[repr(C)] LL | #[repr(simd)] | ^^^^ -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors Some errors have detailed explanations: E0566, E0658. For more information about an error, try `rustc --explain E0566`. diff --git a/src/test/ui/issues/issue-14221.stderr b/src/test/ui/issues/issue-14221.stderr index 3e5e25a9f6d..9864c0840d8 100644 --- a/src/test/ui/issues/issue-14221.stderr +++ b/src/test/ui/issues/issue-14221.stderr @@ -3,6 +3,8 @@ warning[E0170]: pattern binding `A` is named the same as one of the variants of | LL | A => "A", | ^ help: to match on the variant, qualify the path: `E::A` + | + = note: `#[warn(bindings_with_variant_name)]` on by default warning[E0170]: pattern binding `B` is named the same as one of the variants of the type `E` --> $DIR/issue-14221.rs:15:13 diff --git a/src/test/ui/issues/issue-19100.stderr b/src/test/ui/issues/issue-19100.stderr index 1ab13477e37..01e5313fcc1 100644 --- a/src/test/ui/issues/issue-19100.stderr +++ b/src/test/ui/issues/issue-19100.stderr @@ -3,6 +3,8 @@ warning[E0170]: pattern binding `Bar` is named the same as one of the variants o | LL | Bar if true | ^^^ help: to match on the variant, qualify the path: `Foo::Bar` + | + = note: `#[warn(bindings_with_variant_name)]` on by default warning[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` --> $DIR/issue-19100.rs:22:1 diff --git a/src/test/ui/issues/issue-30302.stderr b/src/test/ui/issues/issue-30302.stderr index d762d6f2b3d..ac1b5235f44 100644 --- a/src/test/ui/issues/issue-30302.stderr +++ b/src/test/ui/issues/issue-30302.stderr @@ -3,6 +3,8 @@ warning[E0170]: pattern binding `Nil` is named the same as one of the variants o | LL | Nil => true, | ^^^ help: to match on the variant, qualify the path: `Stack::Nil` + | + = note: `#[warn(bindings_with_variant_name)]` on by default error: unreachable pattern --> $DIR/issue-30302.rs:15:9 diff --git a/src/test/ui/issues/issue-39720.rs b/src/test/ui/issues/issue-39720.rs index 1a4775fc960..8cf841f9371 100644 --- a/src/test/ui/issues/issue-39720.rs +++ b/src/test/ui/issues/issue-39720.rs @@ -1,26 +1,22 @@ // run-pass -#![allow(non_snake_case)] - // ignore-emscripten FIXME(#45351) #![feature(repr_simd, platform_intrinsics)] -#[repr(C)] //~ WARNING conflicting representation hints #[repr(simd)] #[derive(Copy, Clone, Debug)] -pub struct char3(pub i8, pub i8, pub i8); +pub struct Char3(pub i8, pub i8, pub i8); -#[repr(C)] //~ WARNING conflicting representation hints #[repr(simd)] #[derive(Copy, Clone, Debug)] -pub struct short3(pub i16, pub i16, pub i16); +pub struct Short3(pub i16, pub i16, pub i16); extern "platform-intrinsic" { fn simd_cast<T, U>(x: T) -> U; } fn main() { - let cast: short3 = unsafe { simd_cast(char3(10, -3, -9)) }; + let cast: Short3 = unsafe { simd_cast(Char3(10, -3, -9)) }; println!("{:?}", cast); } diff --git a/src/test/ui/issues/issue-39720.stderr b/src/test/ui/issues/issue-39720.stderr deleted file mode 100644 index 8121ed28940..00000000000 --- a/src/test/ui/issues/issue-39720.stderr +++ /dev/null @@ -1,16 +0,0 @@ -warning[E0566]: conflicting representation hints - --> $DIR/issue-39720.rs:8:8 - | -LL | #[repr(C)] - | ^ -LL | #[repr(simd)] - | ^^^^ - -warning[E0566]: conflicting representation hints - --> $DIR/issue-39720.rs:13:8 - | -LL | #[repr(C)] - | ^ -LL | #[repr(simd)] - | ^^^^ - diff --git a/src/test/ui/issues/issue-47094.rs b/src/test/ui/issues/issue-47094.rs index 97da984d4af..3258ee92a74 100644 --- a/src/test/ui/issues/issue-47094.rs +++ b/src/test/ui/issues/issue-47094.rs @@ -1,12 +1,10 @@ -// check-pass - -#[repr(C,u8)] //~ WARNING conflicting representation hints +#[repr(C, u8)] //~ ERROR conflicting representation hints enum Foo { A, B, } -#[repr(C)] //~ WARNING conflicting representation hints +#[repr(C)] //~ ERROR conflicting representation hints #[repr(u8)] enum Bar { A, diff --git a/src/test/ui/issues/issue-47094.stderr b/src/test/ui/issues/issue-47094.stderr index 16bcec0c7bb..c807f644fd3 100644 --- a/src/test/ui/issues/issue-47094.stderr +++ b/src/test/ui/issues/issue-47094.stderr @@ -1,14 +1,17 @@ -warning[E0566]: conflicting representation hints - --> $DIR/issue-47094.rs:3:8 +error[E0566]: conflicting representation hints + --> $DIR/issue-47094.rs:1:8 | -LL | #[repr(C,u8)] - | ^ ^^ +LL | #[repr(C, u8)] + | ^ ^^ -warning[E0566]: conflicting representation hints - --> $DIR/issue-47094.rs:9:8 +error[E0566]: conflicting representation hints + --> $DIR/issue-47094.rs:7:8 | LL | #[repr(C)] | ^ LL | #[repr(u8)] | ^^ +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0566`. diff --git a/src/test/ui/lint/lint-uppercase-variables.stderr b/src/test/ui/lint/lint-uppercase-variables.stderr index f614d5d71f8..b937832ac62 100644 --- a/src/test/ui/lint/lint-uppercase-variables.stderr +++ b/src/test/ui/lint/lint-uppercase-variables.stderr @@ -3,6 +3,8 @@ warning[E0170]: pattern binding `Foo` is named the same as one of the variants o | LL | Foo => {} | ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo` + | + = note: `#[warn(bindings_with_variant_name)]` on by default warning: unused variable: `Foo` --> $DIR/lint-uppercase-variables.rs:22:9 diff --git a/src/test/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr b/src/test/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr index abb8d6907e7..21218d9a173 100644 --- a/src/test/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr +++ b/src/test/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr @@ -3,6 +3,8 @@ warning[E0170]: pattern binding `Bar` is named the same as one of the variants o | LL | Bar => {}, | ^^^ help: to match on the variant, qualify the path: `Foo::Bar` + | + = note: `#[warn(bindings_with_variant_name)]` on by default warning[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` --> $DIR/issue-67776-match-same-name-enum-variant-refs.rs:19:9 |
