From 57e8fc56852e7728d7160242bf13c3ab6e066bd8 Mon Sep 17 00:00:00 2001 From: David Wood Date: Thu, 10 Sep 2020 19:54:17 +0100 Subject: passes: `check_attr` on more targets This commit modifies `check_attr` so that: - Enum variants are now checked (some attributes would not have been prohibited on variants previously). - `check_expr_attributes` and `check_stmt_attributes` are removed as `check_attributes` can perform the same checks. Signed-off-by: David Wood --- src/test/ui/error-codes/E0517.stderr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/ui/error-codes') diff --git a/src/test/ui/error-codes/E0517.stderr b/src/test/ui/error-codes/E0517.stderr index 2cfca1724c8..2f90d4d0baa 100644 --- a/src/test/ui/error-codes/E0517.stderr +++ b/src/test/ui/error-codes/E0517.stderr @@ -1,4 +1,4 @@ -error[E0517]: attribute should be applied to struct, enum, or union +error[E0517]: attribute should be applied to a struct, enum, or union --> $DIR/E0517.rs:1:8 | LL | #[repr(C)] @@ -6,7 +6,7 @@ LL | #[repr(C)] LL | type Foo = u8; | -------------- not a struct, enum, or union -error[E0517]: attribute should be applied to struct or union +error[E0517]: attribute should be applied to a struct or union --> $DIR/E0517.rs:4:8 | LL | #[repr(packed)] @@ -14,7 +14,7 @@ LL | #[repr(packed)] LL | enum Foo2 {Bar, Baz} | -------------------- not a struct or union -error[E0517]: attribute should be applied to enum +error[E0517]: attribute should be applied to an enum --> $DIR/E0517.rs:7:8 | LL | #[repr(u8)] @@ -22,7 +22,7 @@ LL | #[repr(u8)] LL | struct Foo3 {bar: bool, baz: bool} | ---------------------------------- not an enum -error[E0517]: attribute should be applied to struct, enum, or union +error[E0517]: attribute should be applied to a struct, enum, or union --> $DIR/E0517.rs:10:8 | LL | #[repr(C)] -- cgit 1.4.1-3-g733a5