about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-23 17:32:04 +0000
committerbors <bors@rust-lang.org>2020-10-23 17:32:04 +0000
commit7bade6ef730cff83f3591479a98916920f66decd (patch)
treeffd6635bae41a124e6ddeb89d0c5bb55fbae3513 /src/test/ui/error-codes
parent07a63e6d1fabf3560e8e1e17c1d56b10a06152d9 (diff)
parent57e8fc56852e7728d7160242bf13c3ab6e066bd8 (diff)
downloadrust-7bade6ef730cff83f3591479a98916920f66decd.tar.gz
rust-7bade6ef730cff83f3591479a98916920f66decd.zip
Auto merge of #77015 - davidtwco:check-attr-variant-closure-expr, r=lcnr
passes: `check_attr` on more targets

This PR 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. This means that codegen attribute errors aren't shown if there are other errors first (e.g. from other attributes, as shown in `src/test/ui/macros/issue-68060.rs` changes below).
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0517.stderr8
1 files changed, 4 insertions, 4 deletions
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)]