-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix inline_const with interpolated block #113803
Conversation
r? @fee1-dead (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
dabb144
to
79997b0
Compare
} | ||
} | ||
|
||
// This already worked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worked when? please add an issue link so this is clear to future readers and then r=me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm actually there isn't an issue to link to 🤣 then idk if this comment would be useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you could include a mention of this in your commit message so git archaeologists will still be able to find this info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, what I meant was "this has worked since const {}
was implemented", to contrast it with the specific case that const {}
is used in a statement position.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add a comment tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think a comment describing what this test does would be nice (so that the context is not lost with time...)
79997b0
to
7197979
Compare
@bors r=fee1-dead |
Rollup of 7 pull requests Successful merges: - rust-lang#113444 (add tests for alias bound preference) - rust-lang#113716 (Add the `no-builtins` attribute to functions when `no_builtins` is applied at the crate level.) - rust-lang#113754 (Simplify native_libs query) - rust-lang#113765 (Make it clearer that edition functions are `>=`, not `==`) - rust-lang#113774 (Improve error message when closing bracket interpreted as formatting fill character) - rust-lang#113785 (Fix invalid display of inlined re-export when both local and foreign items are inlined) - rust-lang#113803 (Fix inline_const with interpolated block) r? `@ghost` `@rustbot` modify labels: rollup
Interpolation already worked when we had a
const $block
that wasn't a statement expr:But it was failing when the const block was in statement expr position:
... because of a bug in a check for const items. This fixes that.
cc #112953 (comment), though I don't think this requires an FCP since it's already supported in exprs and seems to me to be fully a parser bug.