Apply suggestions from code review

Co-authored-by: Eric Huss <eric@huss.org>
This commit is contained in:
Georg Semmler 2024-01-19 08:11:40 +00:00 committed by Eric Huss
parent 81fe01a111
commit 5baf87cdd9
2 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,7 @@ struct S {
pub fn f() {}
```
> Note: `rustc` currently recognizes the tools "clippy", "rustfmt" and "diagnostics".
> Note: `rustc` currently recognizes the tools "clippy", "rustfmt" and "diagnostic".
## Built-in attributes index
@ -224,7 +224,7 @@ The following is an index of all built-in attributes.
- [`allow`], [`warn`], [`deny`], [`forbid`] — Alters the default lint level.
- [`deprecated`] — Generates deprecation notices.
- [`must_use`] — Generates a lint for unused values.
- [`diagnostic::on_unimplemented`] - Hints the compiler to emit a certain error
- [`diagnostic::on_unimplemented`] Hints the compiler to emit a certain error
message if a trait is not implemented.
- ABI, linking, symbols, and FFI
- [`link`] — Specifies a native library to link with an `extern` block.

View File

@ -315,7 +315,7 @@ The `#[diagnostic::on_unimplemented]` attribute is allowed to appear on trait de
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.
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.
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.
This allows to have a trait definition like: