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
The following program with paste = "0.1.12" compiles on stable (rustc 1.46.0 (04488afe3 2020-08-24)), but doesn't on Nightly (rustc 1.48.0-nightly (0e2c1281e 2020-09-07)).
This is minimized from Firefox source code, which doesn't build anymore with Rust Nightly.
To be fair, I'm surprised it built in the first place...
I'm fixing this in Firefox in https://bugzilla.mozilla.org/show_bug.cgi?id=1663677. There's another macro-related regression that I'm trying to reduce and that seems much harder to work around, but I'll file that separately.
This is intentional - before PR #73084, we were using re-parsed tokens for the call to paste::expr! due to the use of a metavariable. We now use the original tokens, which preserves the hygiene information on self and callback.
@emilio: The breaking changes are unfortunate, but are an unavoidable part of making progress towards fixing #43081. As you noted, the broken code should have never compiled in the first place due to the hygiene rules of macro_rules! macros.
Several Crater runs were performed before landing #73084. Unfortunately, Crater cannot test all Rust code - in this case, it looks like firefox-accounts-bridge could have been tested, but Crater did not know about it (it's on neither crates.io nor GitHub).
In the past, breaking changes at least caused warnings for a release or two, which allowed us to notice the brekage and fix in advance without breaking developer builds. Anyhow I'm ok with this being wontfix, it's just odd to have such breakage being introduced without notice.
Activity
emilio commentedon Sep 8, 2020
The Firefox source for reference: https://searchfox.org/mozilla-central/rev/76a83d0a218837ba6937d6a0fac51cb0008c2334/services/fxaccounts/rust-bridge/firefox-accounts-bridge/src/bridge.rs#26-38,111-113
sugar700 commentedon Sep 8, 2020
This also happens on 1.47.0-beta.2 (84b047b 2020-08-28) making it regression-from-stable-to-beta.
Mark-Simulacrum commentedon Sep 8, 2020
cc @Aaron1011 @petrochenkov
emilio commentedon Sep 8, 2020
I'm fixing this in Firefox in https://bugzilla.mozilla.org/show_bug.cgi?id=1663677. There's another macro-related regression that I'm trying to reduce and that seems much harder to work around, but I'll file that separately.
Aaron1011 commentedon Sep 8, 2020
This is intentional - before PR #73084, we were using re-parsed tokens for the call to
paste::expr!due to the use of a metavariable. We now use the original tokens, which preserves the hygiene information onselfandcallback.emilio commentedon Sep 8, 2020
I'm ok with wontfix, as I noted in my report I was surprised that this compiled at all. But it seems odd to see breaking changes like that...
emilio commentedon Sep 8, 2020
Chances are that #76482 is the same too (just with a bit of indirection because of syn), not sure.
Aaron1011 commentedon Sep 8, 2020
@emilio: The breaking changes are unfortunate, but are an unavoidable part of making progress towards fixing #43081. As you noted, the broken code should have never compiled in the first place due to the hygiene rules of
macro_rules!macros.Several Crater runs were performed before landing #73084. Unfortunately, Crater cannot test all Rust code - in this case, it looks like
firefox-accounts-bridgecould have been tested, but Crater did not know about it (it's on neithercrates.ionor GitHub).Bug 1663677 - Fix macro hygiene usage in fxaccounts/rust-bridge. r=lina
Bug 1663677 - Fix macro hygiene usage in fxaccounts/rust-bridge. r=eo…
emilio commentedon Sep 9, 2020
In the past, breaking changes at least caused warnings for a release or two, which allowed us to notice the brekage and fix in advance without breaking developer builds. Anyhow I'm ok with this being wontfix, it's just odd to have such breakage being introduced without notice.
20 remaining items
Bug 1663677 - Fix macro hygiene usage in fxaccounts/rust-bridge. r=eo…
Bug 1663677 - Fix macro hygiene usage in fxaccounts/rust-bridge. r=lina
Bug 1663677 - Fix macro hygiene usage in fxaccounts/rust-bridge. r=eo…
Mark-Simulacrum commentedon Nov 6, 2020
This was shipped in 1.47, and included in release notes (IIRC). I don't think there's anything further here so let's go ahead and close.
Bug 1663677 - Fix macro hygiene usage in fxaccounts/rust-bridge. r=eo…
WIP: firefox: backport some changes to fix build with newer rust
WIP: firefox: backport some changes to fix build with newer rust
Bug 1663677 - Fix macro hygiene usage in fxaccounts/rust-bridge. r=eo…
Bug 1663677 - Fix macro hygiene usage in fxaccounts/rust-bridge. r=lina
Bug 1663677 - Fix macro hygiene usage in fxaccounts/rust-bridge. r=eo…