You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, that may be right, I wasn't sure where to place it (there are other doc-related lints in Clippy already and perhaps rustdoc treats "stylistic diagnostics" like rustc, i.e. leaves those up to Clippy and other tools).
I think it's actually a better idea to put it into clippy as a style lint because it's completely ok to add rust marker on a codeblock, even if useless in most cases.
What it does
In a documentation example, when processed by
rustdoc
, it is strictly equivalent to writerust
or not (https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html).Thus it would be nice to have a lint that suggest the removal of the unneeded
rust
as language for the example.Some projects may prefer the opposite, i.e. always writing
rust
, but consistency is typically an improvement.Advantage
Drawbacks
rustdoc
system.Example
Could be written as:
The text was updated successfully, but these errors were encountered: