diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-06-29 22:28:39 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2025-06-30 00:02:17 +0200 |
| commit | 0920486fa6c0a3c08e23a867b1e6ca6a5563849b (patch) | |
| tree | c5363c432102359b9dcb4a2426024dbce2239ece /tests | |
| parent | 428208eb9b61f44e5bbab70feea42a8d55994230 (diff) | |
| download | rust-0920486fa6c0a3c08e23a867b1e6ca6a5563849b.tar.gz rust-0920486fa6c0a3c08e23a867b1e6ca6a5563849b.zip | |
Do not autofix comments containing bare CR
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/four_forward_slashes_bare_cr.rs | 6 | ||||
| -rw-r--r-- | tests/ui/four_forward_slashes_bare_cr.stderr | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/four_forward_slashes_bare_cr.rs b/tests/ui/four_forward_slashes_bare_cr.rs new file mode 100644 index 00000000000..19123cd206e --- /dev/null +++ b/tests/ui/four_forward_slashes_bare_cr.rs @@ -0,0 +1,6 @@ +//@no-rustfix +#![warn(clippy::four_forward_slashes)] + +//~v four_forward_slashes +//// nondoc comment with bare CR: ' ' +fn main() {} diff --git a/tests/ui/four_forward_slashes_bare_cr.stderr b/tests/ui/four_forward_slashes_bare_cr.stderr new file mode 100644 index 00000000000..64e70b97db9 --- /dev/null +++ b/tests/ui/four_forward_slashes_bare_cr.stderr @@ -0,0 +1,14 @@ +error: this item has comments with 4 forward slashes (`////`). These look like doc comments, but they aren't + --> tests/ui/four_forward_slashes_bare_cr.rs:5:1 + | +LL | / //// nondoc comment with bare CR: '␍' +LL | | fn main() {} + | |_^ + | + = help: make this a doc comment by removing one `/` + = note: bare CR characters are not allowed in doc comments + = note: `-D clippy::four-forward-slashes` implied by `-D warnings` + = help: to override `-D warnings` add `#[allow(clippy::four_forward_slashes)]` + +error: aborting due to 1 previous error + |
