Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9b7227c

Browse files
committedJul 4, 2024
Properly handle removal suggestion rendering
Do not leave a `+ ` line with only whitespace. In reality, the user will want to remove the entire line.
1 parent b52ac9a commit 9b7227c

4 files changed

+0
-15
lines changed
 

‎tests/ui/dbg_macro/dbg_macro.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ LL | dbg!();
8686
help: remove the invocation before committing it to a version control system
8787
|
8888
LL - dbg!();
89-
LL +
9089
|
9190

9291
error: the `dbg!` macro is intended as a debugging tool
@@ -146,7 +145,6 @@ LL | expand_to_dbg!();
146145
help: remove the invocation before committing it to a version control system
147146
|
148147
LL - dbg!();
149-
LL +
150148
|
151149

152150
error: the `dbg!` macro is intended as a debugging tool

‎tests/ui/dbg_macro/dbg_macro_unfixable.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ LL | dbg!();
99
help: remove the invocation before committing it to a version control system
1010
|
1111
LL - dbg!();
12-
LL +
1312
|
1413

1514
error: the `dbg!` macro is intended as a debugging tool

‎tests/ui/manual_split_once.stderr

-10
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,10 @@ LL | let (l, r) = "a.b.c".split_once('.').unwrap();
9696
help: remove the `iter` usages
9797
|
9898
LL - let l = iter.next().unwrap();
99-
LL +
10099
|
101100
help: remove the `iter` usages
102101
|
103102
LL - let r = iter.next().unwrap();
104-
LL +
105103
|
106104

107105
error: manual implementation of `split_once`
@@ -121,12 +119,10 @@ LL | let (l, r) = "a.b.c".split_once('.')?;
121119
help: remove the `iter` usages
122120
|
123121
LL - let l = iter.next()?;
124-
LL +
125122
|
126123
help: remove the `iter` usages
127124
|
128125
LL - let r = iter.next()?;
129-
LL +
130126
|
131127

132128
error: manual implementation of `rsplit_once`
@@ -146,12 +142,10 @@ LL | let (l, r) = "a.b.c".rsplit_once('.').unwrap();
146142
help: remove the `iter` usages
147143
|
148144
LL - let r = iter.next().unwrap();
149-
LL +
150145
|
151146
help: remove the `iter` usages
152147
|
153148
LL - let l = iter.next().unwrap();
154-
LL +
155149
|
156150

157151
error: manual implementation of `rsplit_once`
@@ -171,12 +165,10 @@ LL | let (l, r) = "a.b.c".rsplit_once('.')?;
171165
help: remove the `iter` usages
172166
|
173167
LL - let r = iter.next()?;
174-
LL +
175168
|
176169
help: remove the `iter` usages
177170
|
178171
LL - let l = iter.next()?;
179-
LL +
180172
|
181173

182174
error: manual implementation of `split_once`
@@ -202,12 +194,10 @@ LL | let (a, b) = "a.b.c".split_once('.').unwrap();
202194
help: remove the `iter` usages
203195
|
204196
LL - let a = iter.next().unwrap();
205-
LL +
206197
|
207198
help: remove the `iter` usages
208199
|
209200
LL - let b = iter.next().unwrap();
210-
LL +
211201
|
212202

213203
error: aborting due to 19 previous errors

‎tests/ui/significant_drop_tightening.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ LL + let rslt0 = mutex.lock().unwrap().abs();
6464
help: remove separated single usage
6565
|
6666
LL - let rslt0 = lock.abs();
67-
LL +
6867
|
6968

7069
error: temporary with significant `Drop` can be early dropped
@@ -88,7 +87,6 @@ LL + mutex.lock().unwrap().clear();
8887
help: remove separated single usage
8988
|
9089
LL - lock.clear();
91-
LL +
9290
|
9391

9492
error: aborting due to 4 previous errors

0 commit comments

Comments
 (0)
Failed to load comments.