summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-03 21:03:37 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-07-04 05:04:48 +0000
commita06a18a47fc36b6c2c7c317c7611fe0a2960765b (patch)
tree7f3b88849b38a10d2b6c096aa4e33ecfa4a76113 /src
parent9344779f718e847283a1ada901bad1222bd5d55b (diff)
Properly handle removal suggestion rendering
Do not leave a `+ ` line with only whitespace. In reality, the user will want to remove the entire line.
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/tests/ui/dbg_macro/dbg_macro.stderr2
-rw-r--r--src/tools/clippy/tests/ui/dbg_macro/dbg_macro_unfixable.stderr1
-rw-r--r--src/tools/clippy/tests/ui/manual_split_once.stderr10
-rw-r--r--src/tools/clippy/tests/ui/significant_drop_tightening.stderr2
4 files changed, 0 insertions, 15 deletions
diff --git a/src/tools/clippy/tests/ui/dbg_macro/dbg_macro.stderr b/src/tools/clippy/tests/ui/dbg_macro/dbg_macro.stderr
index 86667701da0..7d3c3f7c918 100644
--- a/src/tools/clippy/tests/ui/dbg_macro/dbg_macro.stderr
+++ b/src/tools/clippy/tests/ui/dbg_macro/dbg_macro.stderr
@@ -86,7 +86,6 @@ LL | dbg!();
help: remove the invocation before committing it to a version control system
|
LL - dbg!();
-LL +
|
error: the `dbg!` macro is intended as a debugging tool
@@ -146,7 +145,6 @@ LL | expand_to_dbg!();
help: remove the invocation before committing it to a version control system
|
LL - dbg!();
-LL +
|
error: the `dbg!` macro is intended as a debugging tool
diff --git a/src/tools/clippy/tests/ui/dbg_macro/dbg_macro_unfixable.stderr b/src/tools/clippy/tests/ui/dbg_macro/dbg_macro_unfixable.stderr
index d21595c2fcd..16e51f4742e 100644
--- a/src/tools/clippy/tests/ui/dbg_macro/dbg_macro_unfixable.stderr
+++ b/src/tools/clippy/tests/ui/dbg_macro/dbg_macro_unfixable.stderr
@@ -9,7 +9,6 @@ LL | dbg!();
help: remove the invocation before committing it to a version control system
|
LL - dbg!();
-LL +
|
error: the `dbg!` macro is intended as a debugging tool
diff --git a/src/tools/clippy/tests/ui/manual_split_once.stderr b/src/tools/clippy/tests/ui/manual_split_once.stderr
index b4e51f473cf..c5c9be3ac63 100644
--- a/src/tools/clippy/tests/ui/manual_split_once.stderr
+++ b/src/tools/clippy/tests/ui/manual_split_once.stderr
@@ -96,12 +96,10 @@ LL | let (l, r) = "a.b.c".split_once('.').unwrap();
help: remove the `iter` usages
|
LL - let l = iter.next().unwrap();
-LL +
|
help: remove the `iter` usages
|
LL - let r = iter.next().unwrap();
-LL +
|
error: manual implementation of `split_once`
@@ -121,12 +119,10 @@ LL | let (l, r) = "a.b.c".split_once('.')?;
help: remove the `iter` usages
|
LL - let l = iter.next()?;
-LL +
|
help: remove the `iter` usages
|
LL - let r = iter.next()?;
-LL +
|
error: manual implementation of `rsplit_once`
@@ -146,12 +142,10 @@ LL | let (l, r) = "a.b.c".rsplit_once('.').unwrap();
help: remove the `iter` usages
|
LL - let r = iter.next().unwrap();
-LL +
|
help: remove the `iter` usages
|
LL - let l = iter.next().unwrap();
-LL +
|
error: manual implementation of `rsplit_once`
@@ -171,12 +165,10 @@ LL | let (l, r) = "a.b.c".rsplit_once('.')?;
help: remove the `iter` usages
|
LL - let r = iter.next()?;
-LL +
|
help: remove the `iter` usages
|
LL - let l = iter.next()?;
-LL +
|
error: manual implementation of `split_once`
@@ -202,12 +194,10 @@ LL | let (a, b) = "a.b.c".split_once('.').unwrap();
help: remove the `iter` usages
|
LL - let a = iter.next().unwrap();
-LL +
|
help: remove the `iter` usages
|
LL - let b = iter.next().unwrap();
-LL +
|
error: aborting due to 19 previous errors
diff --git a/src/tools/clippy/tests/ui/significant_drop_tightening.stderr b/src/tools/clippy/tests/ui/significant_drop_tightening.stderr
index f818a14cbe6..5fc66279f00 100644
--- a/src/tools/clippy/tests/ui/significant_drop_tightening.stderr
+++ b/src/tools/clippy/tests/ui/significant_drop_tightening.stderr
@@ -64,7 +64,6 @@ LL + let rslt0 = mutex.lock().unwrap().abs();
help: remove separated single usage
|
LL - let rslt0 = lock.abs();
-LL +
|
error: temporary with significant `Drop` can be early dropped
@@ -88,7 +87,6 @@ LL + mutex.lock().unwrap().clear();
help: remove separated single usage
|
LL - lock.clear();
-LL +
|
error: aborting due to 4 previous errors