Skip to content

Tweak comma handling of "missing match arm" suggestion and fix "remove this arm" suggestion, and make suggestion verbose #137409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
16 changes: 12 additions & 4 deletions tests/ui/never_type/unused_trait_in_never_pattern_body.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ LL | |
LL | | use std::ops::Add;
LL | | 0.add(1)
LL | | },
| | ^
| | |
| |_________this will never be executed
| help: remove this expression
| |_________^ this will never be executed
|
help: remove the match arm expression
|
LL - ! => || {
LL -
LL -
LL - use std::ops::Add;
LL - 0.add(1)
LL - },
LL + !,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of lines, to the point that it's a bit hard to even see (without coloration) that this is even suggesting to leave the plain ! and remove everything else. we should probably make this suggestion hidden?

|

error: mismatched types
--> $DIR/unused_trait_in_never_pattern_body.rs:3:9
Expand Down
Loading