-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
Summary
The doc_link_with_quotes lint is documented as:
Detects the syntax
['foo']in documentation comments (notice quotes instead of backticks) outside of code blocks
However it is incorrectly triggering on code inside of code blocks.
Lint Name
doc_link_with_quotes
Reproducer
/// This is a code block:
///
/// ```
/// let _ = vec!['w', 'a', 't'];
/// ```
fn main() {}error: possible intra-doc link using quotes instead of backticks
--> src/main.rs:4:1
|
4 | /// let _ = vec!['w', 'a', 't'];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::doc-link-with-quotes` implied by `-D clippy::pedantic`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_link_with_quotesIt is indeed a code block though.
Mentioning @cameron1024 since this lint was recently added in #8385.
Version
rustc 1.63.0-nightly (50b00252a 2022-06-06)
binary: rustc
commit-hash: 50b00252aeb77b10db04d65dc9e12ce758def4b5
commit-date: 2022-06-06
host: x86_64-unknown-linux-gnu
release: 1.63.0-nightly
LLVM version: 14.0.5
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
