You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an example of the problem that RFC 550 was meant to prevent, which indeed it does:
<anon>:2:6: 2:21 error: `$condition:expr` is followed by `$action:block`, which is not allowed for `expr` fragments
<anon>:2 ($condition:expr $action:block) => ({})
^~~~~~~~~~~~~~~
The ambiguity between struct initializers and blocks is a long-standing wart of the expression grammar. It's probably responsible for other bugs, but it should again not cause macro breakage like this, thanks to RFC 550.
fix: keep attributes in assist 'generate_delegate_trait'
fixrust-lang#15198.
This PR address the issue that `impl` generated by `generate_delegate_trait` doesn't keep attributes.
When I updated to Rust master yesterday, some of my macro invocations broke in an interesting way. Here's a reduced example:
With this workaround, it compiles without errors:
Looks to me like the parser sees "y { ..." and mistakes it for a struct initialization.
This problem occurs with commit 2f74325.
Before the upgrade, it worked fine with commit db29814.
The text was updated successfully, but these errors were encountered: