add doc_link_with_quotes lint
This commit is contained in:
parent
7bb69c0ae0
commit
cb29e3effb
7 changed files with 87 additions and 0 deletions
12
tests/ui/doc_link_with_quotes.rs
Normal file
12
tests/ui/doc_link_with_quotes.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#![warn(clippy::doc_link_with_quotes)]
|
||||
|
||||
fn main() {
|
||||
foo()
|
||||
}
|
||||
|
||||
/// Calls ['bar']
|
||||
pub fn foo() {
|
||||
bar()
|
||||
}
|
||||
|
||||
pub fn bar() {}
|
||||
10
tests/ui/doc_link_with_quotes.stderr
Normal file
10
tests/ui/doc_link_with_quotes.stderr
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
error: possible intra-doc link using quotes instead of backticks
|
||||
--> $DIR/doc_link_with_quotes.rs:7:1
|
||||
|
|
||||
LL | /// Calls ['bar']
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D clippy::doc-link-with-quotes` implied by `-D warnings`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue