Skip to content

Do not complain about non-existing fields after parse recovery - #59266

Merged
bors merged 2 commits into
rust-lang:masterfrom
estebank:struct-parse-recovery
Mar 23, 2019
Merged

Do not complain about non-existing fields after parse recovery#59266
bors merged 2 commits into
rust-lang:masterfrom
estebank:struct-parse-recovery

Conversation

@estebank

Copy link
Copy Markdown
Contributor

When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.

Fix#57361.

When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 18, 2019
Comment threadsrc/test/ui/parser/recovered-struct-variant.stderr
Comment threadsrc/librustc/hir/mod.rs Outdated
Comment threadsrc/libsyntax/ast.rs
Comment threadsrc/libsyntax/parse/parser.rs Outdated
@petrochenkov

Copy link
Copy Markdown
Contributor

r=me with the comments added

@petrochenkovpetrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 19, 2019
@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors r=petrochenkov

@bors

bors commented Mar 19, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 757eb67 has been approved by petrochenkov

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 19, 2019
@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors rollup

Centril added a commit to Centril/rust that referenced this pull request Mar 19, 2019
…etrochenkov
Do not complain about non-existing fields after parse recovery
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
Fixrust-lang#57361.
@CentrilCentril mentioned this pull request Mar 19, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Mar 22, 2019
…etrochenkov
Do not complain about non-existing fields after parse recovery
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
Fixrust-lang#57361.
Centril added a commit to Centril/rust that referenced this pull request Mar 22, 2019
…etrochenkov
Do not complain about non-existing fields after parse recovery
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
Fixrust-lang#57361.
@CentrilCentril mentioned this pull request Mar 22, 2019
bors added a commit that referenced this pull request Mar 22, 2019
Rollup of 18 pull requests
Successful merges:
- #59106 (Add peer_addr function to UdpSocket)
- #59170 (Add const generics to rustdoc)
- #59172 (Update and clean up several parts of CONTRIBUTING.md)
- #59190 (consistent naming for Rhs type parameter in libcore/ops)
- #59236 (Rename miri component to miri-preview)
- #59266 (Do not complain about non-existing fields after parse recovery)
- #59273 (some small HIR doc improvements)
- #59291 (Make Option<ThreadId> no larger than ThreadId, with NonZeroU64)
- #59297 (convert field/method confusion help to suggestions)
- #59304 (Move some bench tests back from libtest)
- #59309 (Add messages for different verbosity levels. Output copy actions.)
- #59321 (Unify E0109, E0110 and E0111)
- #59322 (Tweak incorrect escaped char diagnostic)
- #59323 (use suggestions for "enum instead of variant" error)
- #59327 (Add NAN test to docs)
- #59329 (cleanup: Remove compile-fail-fulldeps directory again)
- #59347 (Move one test from run-make-fulldeps to ui)
- #59360 (Add tracking issue number for `seek_convenience`)
Failed merges:
r? @ghost
@bors
bors merged commit 757eb67 into rust-lang:masterMar 23, 2019
@estebank
estebank deleted the struct-parse-recovery branch November 9, 2023 05:20
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@estebank@rust-highfive@petrochenkov@bors