We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99f36b1 commit a4dcd1fCopy full SHA for a4dcd1f
src/attributes.md
@@ -49,7 +49,7 @@ Attributes may be applied to many things in the language:
49
* [Match expression arms][match expressions] accept outer attributes.
50
* [Generic lifetime or type parameter][generics] accept outer attributes.
51
52
-An example of attributes:
+Some examples of attributes:
53
54
```rust
55
// General metadata applied to the enclosing module or crate.
@@ -70,6 +70,15 @@ mod bar {
70
// A lint attribute used to suppress a warning/error
71
#[allow(non_camel_case_types)]
72
type int8_t = i8;
73
+
74
+// Outer attribute applies to the entire function.
75
+fn some_unused_variables() {
76
+ #![allow(unused_variables)]
77
78
+ let x = ();
79
+ let y = ();
80
+ let z = ();
81
+}
82
```
83
84
The rest of this page describes or links to descriptions of which attribute
0 commit comments