Skip to content

Fix incorrect suggestion for enum variant#146672

Draft
NKID00 wants to merge 1 commit into
rust-lang:mainfrom
NKID00:fix-issue-146586
Draft

Fix incorrect suggestion for enum variant#146672
NKID00 wants to merge 1 commit into
rust-lang:mainfrom
NKID00:fix-issue-146586

Conversation

@NKID00

@NKID00 NKID00 commented Sep 17, 2025

Copy link
Copy Markdown

This PR fixes #130395, fixes #146261, fixes #146586 and fixes #146706.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 17, 2025
@NKID00

This comment was marked as outdated.

@NKID00

NKID00 commented Sep 17, 2025

Copy link
Copy Markdown
Author

Actually you don't need fn_traits, (Enum::Variant)() is a totally legitimate way to construct a tuple variant, and would still garble the suggestion.

@rust-log-analyzer

This comment has been minimized.

@NKID00

NKID00 commented Sep 18, 2025

Copy link
Copy Markdown
Author

Seems to also fix #130395, which looks like a duplicate of #146261.

@cyrgani

cyrgani commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

Does this also fix #146706?

@NKID00

NKID00 commented Sep 18, 2025

Copy link
Copy Markdown
Author

Does this also fix #146706?

Not automatically fixed. But this bug also seems to be related with garbled suggestions generating overlapping spans.

@jdonszelmann

Copy link
Copy Markdown
Contributor

will conflict with #146731

@jdonszelmann

jdonszelmann commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

I think these commits deserve some squashing (though I realize now that this is a draft, feedback may be premature)

Comment on lines +3 to +4
//@ only-linux
//@ compile-flags: --error-format=human --color=always

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
//@ only-linux
//@ compile-flags: --error-format=human --color=always

I know this is a WIP PR but please don't keep this test Linux exclusive (that's just worse DX for Windows rustc devs) and don't keep it as an SVG test, there's no reason to add a 1100 line SVG for this diagnostic.

@bors

bors commented Oct 22, 2025

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #147957) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC

Copy link
Copy Markdown
Member

@NKID00 any updates on this? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

8 participants