Skip to content

Commit ed6d243

Browse files
weiznichehuss
andauthored
Apply suggestions from code review
Co-authored-by: Eric Huss <[email protected]>
1 parent d362a05 commit ed6d243

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/attributes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ struct S {
196196
pub fn f() {}
197197
```
198198

199-
> Note: `rustc` currently recognizes the tools "clippy", "rustfmt" and "diagnostics".
199+
> Note: `rustc` currently recognizes the tools "clippy", "rustfmt" and "diagnostic".
200200
201201
## Built-in attributes index
202202

@@ -224,7 +224,7 @@ The following is an index of all built-in attributes.
224224
- [`allow`], [`warn`], [`deny`], [`forbid`] — Alters the default lint level.
225225
- [`deprecated`] — Generates deprecation notices.
226226
- [`must_use`] — Generates a lint for unused values.
227-
- [`diagnostic::on_unimplemented`] - Hints the compiler to emit a certain error
227+
- [`diagnostic::on_unimplemented`] Hints the compiler to emit a certain error
228228
message if a trait is not implemented.
229229
- ABI, linking, symbols, and FFI
230230
- [`link`] — Specifies a native library to link with an `extern` block.

src/attributes/diagnostics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ The `#[diagnostic::on_unimplemented]` attribute is allowed to appear on trait de
315315
316316
The `note` option can appear several times, which results in several note messages being emitted. If any of the other options appears several times the first occurrence of the relevant option specifies the actually used value. Any other occurrence generates an lint warning. For any other non-existing option a lint-warning is generated.
317317
318-
All three options accept a text as argument. This text is allowed to contain format parameters referring to generic argument or `Self` by name via the `{Self}` or `{NameOfGenericArgument}` syntax. For any non-existing argument a lint warning is generated.
318+
All three options accept a text as argument. This text is allowed to contain format parameters referring to generic argument or `Self` by name via the `{Self}` or `{NameOfGenericArgument}` syntax. Any other format parameter will generate a warning, but will otherwise be included in the string as-is.
319319
320320
This allows to have a trait definition like:
321321

0 commit comments

Comments
 (0)