1
Fork 0

resolve: mark it undetermined if single import is not has any bindings

This commit is contained in:
bohan 2024-06-04 12:40:41 +08:00
parent 1689a5a531
commit f67a0eb2b7
11 changed files with 142 additions and 41 deletions

View file

@ -352,9 +352,9 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
(old_glob @ true, false) | (old_glob @ false, true) => {
let (glob_binding, nonglob_binding) =
if old_glob { (old_binding, binding) } else { (binding, old_binding) };
if glob_binding.res() != nonglob_binding.res()
&& key.ns == MacroNS
if key.ns == MacroNS
&& nonglob_binding.expansion != LocalExpnId::ROOT
&& glob_binding.res() != nonglob_binding.res()
{
resolution.binding = Some(this.ambiguity(
AmbiguityKind::GlobVsExpanded,