forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#12809 - GuillaumeGomez:missing-backticks-fix,…
… r=y21 Correctly handle closing parens in `missing_backticks` doc lint Fixes rust-lang#12795. changelog: Correctly handle closing parens in `doc_markdown` lint
- Loading branch information
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#![warn(clippy::doc_markdown)] | ||
|
||
//! A comment with `a_b(x)` and `a_c` in it and (`a_b((c))` ) too and (maybe `a_b((c))`) | ||
//~^ ERROR: item in documentation is missing backticks | ||
//~| ERROR: item in documentation is missing backticks | ||
//~| ERROR: item in documentation is missing backticks | ||
//~| ERROR: item in documentation is missing backticks | ||
|
||
pub fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#![warn(clippy::doc_markdown)] | ||
|
||
//! A comment with a_b(x) and a_c in it and (a_b((c)) ) too and (maybe a_b((c))) | ||
//~^ ERROR: item in documentation is missing backticks | ||
//~| ERROR: item in documentation is missing backticks | ||
//~| ERROR: item in documentation is missing backticks | ||
//~| ERROR: item in documentation is missing backticks | ||
|
||
pub fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
error: item in documentation is missing backticks | ||
--> tests/ui/doc/issue_12795.rs:3:20 | ||
| | ||
LL | //! A comment with a_b(x) and a_c in it and (a_b((c)) ) too and (maybe a_b((c))) | ||
| ^^^^^^ | ||
| | ||
= note: `-D clippy::doc-markdown` implied by `-D warnings` | ||
= help: to override `-D warnings` add `#[allow(clippy::doc_markdown)]` | ||
help: try | ||
| | ||
LL | //! A comment with `a_b(x)` and a_c in it and (a_b((c)) ) too and (maybe a_b((c))) | ||
| ~~~~~~~~ | ||
|
||
error: item in documentation is missing backticks | ||
--> tests/ui/doc/issue_12795.rs:3:31 | ||
| | ||
LL | //! A comment with a_b(x) and a_c in it and (a_b((c)) ) too and (maybe a_b((c))) | ||
| ^^^ | ||
| | ||
help: try | ||
| | ||
LL | //! A comment with a_b(x) and `a_c` in it and (a_b((c)) ) too and (maybe a_b((c))) | ||
| ~~~~~ | ||
|
||
error: item in documentation is missing backticks | ||
--> tests/ui/doc/issue_12795.rs:3:46 | ||
| | ||
LL | //! A comment with a_b(x) and a_c in it and (a_b((c)) ) too and (maybe a_b((c))) | ||
| ^^^^^^^^ | ||
| | ||
help: try | ||
| | ||
LL | //! A comment with a_b(x) and a_c in it and (`a_b((c))` ) too and (maybe a_b((c))) | ||
| ~~~~~~~~~~ | ||
|
||
error: item in documentation is missing backticks | ||
--> tests/ui/doc/issue_12795.rs:3:72 | ||
| | ||
LL | //! A comment with a_b(x) and a_c in it and (a_b((c)) ) too and (maybe a_b((c))) | ||
| ^^^^^^^^ | ||
| | ||
help: try | ||
| | ||
LL | //! A comment with a_b(x) and a_c in it and (a_b((c)) ) too and (maybe `a_b((c))`) | ||
| ~~~~~~~~~~ | ||
|
||
error: aborting due to 4 previous errors | ||
|