parser: not insert dummy field in struct#114704
Conversation
|
cc @Centri3 |
|
(rustbot has picked a reviewer for you, use r? to override) |
|
This is a somewhat sad regression but it's fine imo |
|
r=me when ci is green @bors delegate+ rollup |
|
✌️ @bvanjoi, you can now approve this pull request! If @compiler-errors told you to " |
It really isn't. You can easily give it its name by using the already parsed Instead, I think, if you want to go through the trouble, make We'll also need to edit This shouldn't even be that big of a performance regression since all it is is usually a pointer under the hood, and a single |
This represents an improved solution. @rustbot ready |
compiler-errors
left a comment
There was a problem hiding this comment.
Sorry for the back and forth @bvanjoi, but I thought about this some more and I'm not convinced that all of the changes are worth it. Let's just go with the simple approach and bail eagerly.
|
@rustbot author |
Not to worry. As a beginner, every piece of advice is invaluable. @rustbot ready |
|
@bors r+ rollup |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#113565 (Make SIGSEGV handler emit nicer backtraces) - rust-lang#114704 (parser: not insert dummy field in struct) - rust-lang#115272 (miri/diagnostics: don't forget to print_backtrace when ICEing on unexpected errors) - rust-lang#115313 (Make `get_return_block()` return `Some` only for HIR nodes in body) - rust-lang#115347 (suggest removing `impl` in generic trait bound position) - rust-lang#115355 (new solver: handle edge case of a recursion limit of 0) - rust-lang#115363 (Don't suggest adding parentheses to call an inaccessible method.) r? `@ghost` `@rustbot` modify labels: rollup
Fixes #114636
This PR eliminates the dummy field, initially introduced in #113999, thereby enabling unrestricted use of
ident.unwrap(). A side effect of this action is that we can only report the error of the first macro invocation field within the struct node.An alternative solution might be giving a virtual name to the macro, but it appears more complex.(#114636 (comment)). Furthermore, if you think #114636 (comment) is a better solution, feel free to close this PR.