Skip to content

Commit d18480a

Browse files
committed
Fix Typos
1 parent f454c0f commit d18480a

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

Diff for: src/attributes/diagnostics.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ For any lint check `C`:
1616
* `#[allow(C)]` overrides the check for `C` so that violations will go
1717
unreported.
1818
* `#[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.
2121
* `#[warn(C)]` warns about violations of `C` but continues compilation.
2222
* `#[deny(C)]` signals an error after encountering a violation of `C`,
2323
* `#[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
9292
a certain attribute was added. This reason will be displayed as part of the lint
9393
message if the lint is emitted at the defined level.
9494

95-
```rust,edition2015
95+
```edition2015,fail
9696
// `keyword_idents` is allowed by default. Here we deny it to
9797
// avoid migration of identifies when we update the edition.
9898
#![deny(
@@ -143,7 +143,7 @@ fn main() {
143143

144144
// This `#[expect]` attribute creates a lint expectation that will be fulfilled, since
145145
// 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.
147147
#[expect(unused_variables)]
148148
let answer = "SpongeBob SquarePants!";
149149
}
@@ -178,7 +178,7 @@ fn select_song() {
178178
}
179179
```
180180

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
182182
lint group it's enough if one lint inside the group has been emitted:
183183

184184
```rust
@@ -193,7 +193,7 @@ pub fn another_example() {
193193
// This attribute creates two lint expectations. The `unused_mut` lint will be
194194
// suppressed and with that fulfill the first expectation. The `unused_variables`
195195
// 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.
197197
#[expect(unused_mut, unused_variables)]
198198
let mut link = "https://www.rust-lang.org/";
199199

@@ -202,8 +202,7 @@ pub fn another_example() {
202202
```
203203

204204
> 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.
207206
208207
### Lint groups
209208

@@ -514,7 +513,6 @@ error[E0277]: My Message for `ImportantTrait<i32>` implemented for `String`
514513
[let statement]: ../statements.md#let-statements
515514
[macro definition]: ../macros-by-example.md
516515
[module]: ../items/modules.md
517-
[RFC 2383]: https://rust-lang.github.io/rfcs/2383-lint-reasons.html
518516
[rustc book]: ../../rustc/lints/index.html
519517
[rustc-lint-caps]: ../../rustc/lints/levels.html#capping-lints
520518
[rustc-lint-cli]: ../../rustc/lints/levels.html#via-compiler-flag

0 commit comments

Comments
 (0)