Skip to content

Commit bd3f363

Browse files
committed
Move the do_not_recommend syntax
1 parent 29d6d79 commit bd3f363

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/attributes/diagnostics.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,11 +657,12 @@ The *`diagnostic::do_not_recommend` [attribute][attributes]* is a hint to the co
657657
>
658658
> For example, in an error message about a type not implementing a required trait, the compiler may find a trait implementation that would satisfy the requirements if it weren't for specific bounds in the trait implementation. The compiler may tell the user that there is an impl, but the problem is the bounds in the trait implementation. The `#[diagnostic::do_not_recommend]` attribute can be used to tell the compiler to *not* tell the user about the trait implementation, and instead simply tell the user the type doesn't implement the required trait.
659659
660+
r[attributes.diagnostic.do_not_recommend.syntax]
661+
The `diagnostic::do_not_recommend` attribute does not accept any arguments, though unexpected arguments are not considered as an error.
662+
660663
r[attributes.diagnostic.do_not_recommend.allowed-positions]
661664
The attribute should be placed on a [trait implementation item][trait-impl], though it is not an error to be located in other positions.
662665
663-
r[attributes.diagnostic.do_not_recommend.syntax]
664-
The attribute does not accept any arguments, though unexpected arguments are not considered as an error.
665666
666667
[Clippy]: https://github.com/rust-lang/rust-clippy
667668
[`Drop`]: ../special-types-and-traits.md#drop

0 commit comments

Comments
 (0)