Remove special handling of box expressions from parser#120063
Remove special handling of box expressions from parser#120063bors merged 2 commits intorust-lang:masterfrom
box expressions from parser#120063Conversation
|
(rustbot has picked a reviewer for you, use r? to override) |
c41dfd0 to
3343f2f
Compare
|
Does this regress the following stable code (I can't check right now)? macro_rules! check { (box $e:expr) => {} }
check! { box 0 }I'm aware that you've reverted the change to |
|
No, that code compiles fine on the current reverted version |
|
Hm, thinking about this a bit more lead to me to this summary of what this PR does: it replaced a really nice error with a worse error, while removing some complexity from the expression parser. I don't think I can justify making this error (that will probably be hit by people!) worse without the substantial benefit of freeing up the keyword, which can't happen anyways for now. |
3343f2f to
5aea75d
Compare
This comment has been minimized.
This comment has been minimized.
5aea75d to
3f7c784
Compare
|
r? nilstrieb |
Noratrieb
left a comment
There was a problem hiding this comment.
thanks! this is a nice code simplicifaction
|
@bors r+ |
…ilstrieb Remove special handling of `box` expressions from parser rust-lang#108471 added a temporary hack to parse `box expr`. It's been almost a year since then, so I think it's safe to remove the special handling. As a drive-by cleanup, move `parser/removed-syntax*` tests to their own directory.
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#118257 (Make traits / trait methods detected by the dead code lint) - rust-lang#119997 (Fix impl stripped in rustdoc HTML whereas it should not be in case the impl is implemented on a type alias) - rust-lang#120000 (Ensure `callee_id`s are body owners) - rust-lang#120015 (coverage: Format all coverage tests with `rustfmt`) - rust-lang#120063 (Remove special handling of `box` expressions from parser) - rust-lang#120138 (Increase vscode settings.json `git.detectSubmodulesLimit`) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#119997 (Fix impl stripped in rustdoc HTML whereas it should not be in case the impl is implemented on a type alias) - rust-lang#120000 (Ensure `callee_id`s are body owners) - rust-lang#120063 (Remove special handling of `box` expressions from parser) - rust-lang#120116 (Remove alignment-changing in-place collect) - rust-lang#120138 (Increase vscode settings.json `git.detectSubmodulesLimit`) - rust-lang#120169 (Spelling fix) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#120063 - clubby789:remove-box-handling, r=Nilstrieb Remove special handling of `box` expressions from parser rust-lang#108471 added a temporary hack to parse `box expr`. It's been almost a year since then, so I think it's safe to remove the special handling. As a drive-by cleanup, move `parser/removed-syntax*` tests to their own directory.
#108471 added a temporary hack to parse
box expr. It's been almost a year since then, so I think it's safe to remove the special handling.As a drive-by cleanup, move
parser/removed-syntax*tests to their own directory.