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
Only the conch-runtime tests were affected by this, which were fixed a while back but I didn't end up releasing a new version (an oversight which has now been corrected)
All the ambiguities are legitimate, sorry :(
This is all fallout from enabling macro modularization in general.
I think we may be able to reliably disambiguate some of these in the future, but that's not something that can be backported to beta.
One low-hanging fruit is treating glob imports from other crates as single imports for the purposes of restricted shadowing.
Cross-crate globs are available immediately and don't require going through fix-point, so it's not necessary to apply restricted shadowing to them.
I'll try to implement it and then we can think about backporting.
One low-hanging fruit is treating glob imports from other crates as single imports for the purposes of restricted shadowing.
It actually won't help with regressions here, I've misinterpreted the error messages.
The ambiguities in listed crates are "macro_rules definition" vs "macro in module", so they are not caused by restricted glob shadowing.
They need some disambiguation scheme similar to "let variable" vs "item in block", but at module level.
fnmain(){let x = || 0;println!("{:?}", x());{println!("{:?}", x());fnx() -> i32{1}println!("{:?}", x());let x = || 2;println!("{:?}", x());}println!("{:?}", x());}
---
01120
I don't think so? In all the regressed cases the macro_rules resolution is expected, and modularized resolutions are accidental - either from globs, or from #[macro_export] planted into the root module.
It's not something to-be-deprecated/hacky either - I planned to implement the scoping rules from #54472 (comment) eventually anyway since it's kinda "natural" expected behavior for let-like things, the regressions just made the matter more urgent.
Activity
ipetkov commentedon Sep 22, 2018
Only the
conch-runtimetests were affected by this, which were fixed a while back but I didn't end up releasing a new version (an oversight which has now been corrected)petrochenkov commentedon Sep 26, 2018
All the ambiguities are legitimate, sorry :(
This is all fallout from enabling macro modularization in general.
I think we may be able to reliably disambiguate some of these in the future, but that's not something that can be backported to beta.
One low-hanging fruit is treating glob imports from other crates as single imports for the purposes of restricted shadowing.
Cross-crate globs are available immediately and don't require going through fix-point, so it's not necessary to apply restricted shadowing to them.
I'll try to implement it and then we can think about backporting.
petrochenkov commentedon Sep 26, 2018
It actually won't help with regressions here, I've misinterpreted the error messages.
The ambiguities in listed crates are "
macro_rulesdefinition" vs "macro in module", so they are not caused by restricted glob shadowing.They need some disambiguation scheme similar to "
letvariable" vs "item in block", but at module level.petrochenkov commentedon Sep 27, 2018
Partially fixed in #54605 using subset of the
letrules described in the previous comment.EDIT: I'm planning to extend #54605 to the full fix so far, but haven't yet looked what exactly causes
smpl_jwtandoff_blockwayto fail.nagisa commentedon Sep 27, 2018
@petrochenkov should we also warn when resolving in favour of
macro_rules!?petrochenkov commentedon Sep 27, 2018
I don't think so? In all the regressed cases the
macro_rulesresolution is expected, and modularized resolutions are accidental - either from globs, or from#[macro_export]planted into the root module.It's not something to-be-deprecated/hacky either - I planned to implement the scoping rules from #54472 (comment) eventually anyway since it's kinda "natural" expected behavior for
let-like things, the regressions just made the matter more urgent.petrochenkov commentedon Sep 27, 2018
Minimized reproduction for
smpl_jwtandoff_blockway:petrochenkov commentedon Oct 2, 2018
#54605 is updated with a fix for the remaining regressions.
Auto merge of #54605 - petrochenkov:mambig, r=alexcrichton
Auto merge of #54605 - petrochenkov:mambig, r=alexcrichton