add doc_link_with_quotes lint

This commit is contained in:
cameron 2022-02-01 11:21:42 +00:00
parent 7bb69c0ae0
commit cb29e3effb
7 changed files with 87 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#![warn(clippy::doc_link_with_quotes)]
fn main() {
foo()
}
/// Calls ['bar']
pub fn foo() {
bar()
}
pub fn bar() {}

View 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