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
There was a problem hiding this comment.
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.
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.
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.
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.
I can add a comment tho.
There was a problem hiding this comment.
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 $blockthat 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.