about summary refs log tree commit diff
path: root/tests/ui/attributes/optimize.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/attributes/optimize.stderr')
-rw-r--r--tests/ui/attributes/optimize.stderr30
1 files changed, 14 insertions, 16 deletions
diff --git a/tests/ui/attributes/optimize.stderr b/tests/ui/attributes/optimize.stderr
index ad9309d27a5..2ded1a973f3 100644
--- a/tests/ui/attributes/optimize.stderr
+++ b/tests/ui/attributes/optimize.stderr
@@ -1,36 +1,34 @@
-error: attribute applied to an invalid target
+error: `#[optimize]` attribute cannot be used on structs
   --> $DIR/optimize.rs:8:1
    |
 LL | #[optimize(speed)]
    | ^^^^^^^^^^^^^^^^^^
-LL | struct F;
-   | --------- invalid target
+   |
+   = help: `#[optimize]` can only be applied to functions
 
-error: attribute applied to an invalid target
+error: `#[optimize]` attribute cannot be used on expressions
   --> $DIR/optimize.rs:12:5
    |
-LL |       #[optimize(speed)]
-   |       ^^^^^^^^^^^^^^^^^^
-LL | /     {
-LL | |         1
-LL | |     };
-   | |_____- invalid target
+LL |     #[optimize(speed)]
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+   = help: `#[optimize]` can only be applied to functions
 
-error: attribute applied to an invalid target
+error: `#[optimize]` attribute cannot be used on modules
   --> $DIR/optimize.rs:21:1
    |
 LL | #[optimize(speed)]
    | ^^^^^^^^^^^^^^^^^^
-LL | mod valid_module {}
-   | ------------------- invalid target
+   |
+   = help: `#[optimize]` can only be applied to functions
 
-error: attribute applied to an invalid target
+error: `#[optimize]` attribute cannot be used on inherent impl blocks
   --> $DIR/optimize.rs:24:1
    |
 LL | #[optimize(speed)]
    | ^^^^^^^^^^^^^^^^^^
-LL | impl F {}
-   | --------- invalid target
+   |
+   = help: `#[optimize]` can only be applied to functions
 
 error: aborting due to 4 previous errors