@@ -16,8 +16,8 @@ For any lint check `C`:
16
16
* ` #[allow(C)] ` overrides the check for ` C ` so that violations will go
17
17
unreported.
18
18
* ` #[expect(C)] ` indicates that lint ` C ` is expected to be emitted. The
19
- attribute will suppres the emission of ` C ` or issue a warning, if the
20
- expectation is unfillfilled .
19
+ attribute will suppress the emission of ` C ` or issue a warning, if the
20
+ expectation is unfulfilled .
21
21
* ` #[warn(C)] ` warns about violations of ` C ` but continues compilation.
22
22
* ` #[deny(C)] ` signals an error after encountering a violation of ` C ` ,
23
23
* ` #[forbid(C)] ` is the same as ` deny(C) ` , but also forbids changing the lint
@@ -92,7 +92,7 @@ All lint attributes support an additional `reason` parameter, to give context wh
92
92
a certain attribute was added. This reason will be displayed as part of the lint
93
93
message if the lint is emitted at the defined level.
94
94
95
- ``` rust, edition2015
95
+ ``` edition2015,fail
96
96
// `keyword_idents` is allowed by default. Here we deny it to
97
97
// avoid migration of identifies when we update the edition.
98
98
#![deny(
@@ -143,7 +143,7 @@ fn main() {
143
143
144
144
// This `#[expect]` attribute creates a lint expectation that will be fulfilled, since
145
145
// the `answer` variable is never used. The `unused_variables` lint, that would usually
146
- // be emitted, is supressed . No warning will be issued for the statement or attribute.
146
+ // be emitted, is suppressed . No warning will be issued for the statement or attribute.
147
147
#[expect(unused_variables)]
148
148
let answer = " SpongeBob SquarePants!" ;
149
149
}
@@ -178,7 +178,7 @@ fn select_song() {
178
178
}
179
179
```
180
180
181
- If the ` expect ` attribute contains several lints, each one is expected separatly . For a
181
+ If the ` expect ` attribute contains several lints, each one is expected separately . For a
182
182
lint group it's enough if one lint inside the group has been emitted:
183
183
184
184
``` rust
@@ -193,7 +193,7 @@ pub fn another_example() {
193
193
// This attribute creates two lint expectations. The `unused_mut` lint will be
194
194
// suppressed and with that fulfill the first expectation. The `unused_variables`
195
195
// wouldn't be emitted, since the variable is used. That expectation will therefore
196
- // be unsatified , and a warning will be emitted.
196
+ // be unsatisfied , and a warning will be emitted.
197
197
#[expect(unused_mut, unused_variables)]
198
198
let mut link = " https://www.rust-lang.org/" ;
199
199
@@ -202,8 +202,7 @@ pub fn another_example() {
202
202
```
203
203
204
204
> Note: The behavior of ` #[expect(unfulfilled_lint_expectations)] ` is currently
205
- > defined to always generate the ` unfulfilled_lint_expectations ` lint. This may
206
- > change in the future.
205
+ > defined to always generate the ` unfulfilled_lint_expectations ` lint.
207
206
208
207
### Lint groups
209
208
@@ -514,7 +513,6 @@ error[E0277]: My Message for `ImportantTrait<i32>` implemented for `String`
514
513
[ let statement ] : ../statements.md#let-statements
515
514
[ macro definition ] : ../macros-by-example.md
516
515
[ module ] : ../items/modules.md
517
- [ RFC 2383 ] : https://rust-lang.github.io/rfcs/2383-lint-reasons.html
518
516
[ rustc book ] : ../../rustc/lints/index.html
519
517
[ rustc-lint-caps ] : ../../rustc/lints/levels.html#capping-lints
520
518
[ rustc-lint-cli ] : ../../rustc/lints/levels.html#via-compiler-flag
0 commit comments