]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/attr.stderr
Change syntax for TyAlias where clauses
[rust.git] / src / test / ui / parser / attr.stderr
index 400a0276b3b608f8719535175c3ad846dd52b2c4..3cec61fe41eea9170d3bbfcb4743c47d4e02d7d9 100644 (file)
@@ -3,8 +3,16 @@ error: an inner attribute is not permitted in this context
    |
 LL | #![lang = "foo"]
    | ^^^^^^^^^^^^^^^^
+LL |
+LL | fn foo() {}
+   | ----------- the inner attribute doesn't annotate this function
    |
-   = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
+   = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
+help: to annotate the function, change the attribute from inner to outer style
+   |
+LL - #![lang = "foo"]
+LL + #[lang = "foo"]
+   | 
 
 error[E0522]: definition of an unknown language item: `foo`
   --> $DIR/attr.rs:5:1