[Proof of concept] Recover from struct literals with placeholder path #122288
Closed
fmease wants to merge 1 commit intorust-lang:masterfrom
Closed
[Proof of concept] Recover from struct literals with placeholder path #122288fmease wants to merge 1 commit intorust-lang:masterfrom
fmease wants to merge 1 commit intorust-lang:masterfrom
Conversation
04a54a6 to
be2e80e
Compare
Contributor
|
If you want to chat about this approach, happy to, but I've removed the S-waiting-on-review since not sure if you want input or not. |
Collaborator
|
☔ The latest upstream changes (presumably #124277) made this pull request unmergeable. Please resolve the merge conflicts. |
fmease
commented
May 27, 2024
| if se.path == kw::Empty | ||
| && self.r.dcx().has_stashed_diagnostic(expr.span, StashKey::StructLitNoType) | ||
| { | ||
| return; |
Member
Author
There was a problem hiding this comment.
We're skipping name resolution entirely as mentioned in the PR description.
@petrochenkov, I'm sure this is super wrong. Please do enlighten me how I
could do better. No rush, though, this is a low priority experimental diagnostic PR.
Member
Author
There was a problem hiding this comment.
Do pings actually work inside draft PRs? 🤔
Member
Author
|
Currently not interested in pursuing this further. |
Megadash452
added a commit
to Megadash452/rust
that referenced
this pull request
Jan 18, 2026
Originally authored by fmease for rust-lang#122288
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm surprised my naive approach seems to work but it feels more than hacky (skipping name resolution entirely). I hope to gather some feedback for how to make this more robust and a bit cleaner and for how to resolve the various
FIXME(fmease)s I added.Not sure if I will continue this work by the way, it was a fun experiment on a Saturday evening. Of course, it would be awesome if this landed in some way or another :)
Fixes #98282.
Doesn't address #105398 yet.
r? diagnostics