-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve suggestion and add more tests
- Loading branch information
Showing
7 changed files
with
96 additions
and
49 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
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
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,7 @@ | ||
/// borked doc comment on the first line. doesn't combust! | ||
fn a() {} | ||
|
||
//@run-rustfix | ||
// This test's entire purpose is to make sure we don't panic if the comment with four slashes | ||
// extends to the first line of the file. This is likely pretty rare in production, but an ICE is an | ||
// ICE. |
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,7 @@ | ||
//// borked doc comment on the first line. doesn't combust! | ||
fn a() {} | ||
|
||
//@run-rustfix | ||
// This test's entire purpose is to make sure we don't panic if the comment with four slashes | ||
// extends to the first line of the file. This is likely pretty rare in production, but an ICE is an | ||
// ICE. |
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,15 @@ | ||
error: this item has comments with 4 forward slashes (`////`). These look like doc comments, but they aren't | ||
--> $DIR/four_forward_slashes_first_line.rs:1:1 | ||
| | ||
LL | / //// borked doc comment on the first line. doesn't combust! | ||
LL | | fn a() {} | ||
| |_ | ||
| | ||
= note: `-D clippy::four-forward-slashes` implied by `-D warnings` | ||
help: make this a doc comment by removing one `/` | ||
| | ||
LL + /// borked doc comment on the first line. doesn't combust! | ||
| | ||
|
||
error: aborting due to previous error | ||
|