Skip to content

Commit 0034136

Browse files
committed
Auto merge of #148043 - lqd:revert-146121, r=wesleywiser
Revert "fix: Filter suggestion parts that match existing code" As requested by `@wesleywiser` in rust-lang/rust#147973 (comment) this is a revert of rust-lang/rust#146121 due to the handful of diagnostics ICEs that have been since reported, and found in the beta crater run. This should thus also be backported to beta so the ICEs don't make it to next week's stable. Works around (after backport) - rust-lang/rust#146261 - rust-lang/rust#146706 - rust-lang/rust#146834 but I didn't add a test for this allowed-by-default lint - as well as the crater run regressions from rust-lang/rust#147973 of which I only added the MCVE as a test. The proper fix would likely be rust-lang/rust#147849 but it's still currently at the MCP stage. In the meantime, this PR would still emit the same overlapping suggestions, but still use a debug-assert... r? `@wesleywiser`
2 parents d4f0607 + c7560d4 commit 0034136

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/ui/bool_assert_comparison.stderr

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,10 @@ LL | assert_eq!(a!(), true);
272272
|
273273
help: replace it with `assert!(..)`
274274
|
275-
LL - assert_eq!(a!(), true);
276-
LL + assert!(a!());
275+
LL | true
276+
...
277+
LL |
278+
LL ~ assert!(a!());
277279
|
278280

279281
error: used `assert_eq!` with a literal bool
@@ -284,8 +286,10 @@ LL | assert_eq!(true, b!());
284286
|
285287
help: replace it with `assert!(..)`
286288
|
287-
LL - assert_eq!(true, b!());
288-
LL + assert!(b!());
289+
LL | true
290+
...
291+
LL |
292+
LL ~ assert!(b!());
289293
|
290294

291295
error: used `debug_assert_eq!` with a literal bool

0 commit comments

Comments
 (0)