Skip to content

Conversation

@yaahc
Copy link
Owner

@yaahc yaahc commented Dec 2, 2025

No description provided.

Comment on lines +16 to +18
// I had hoped that this would not produce the globvsglob error because it would never be
// resolving `panic` via one of the ambiguous glob imports above but it appears to do so, not
// sure why
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expected this to only have two candidates because both globs are in the same scope, so panic candidates should only exist in two scopes total and it should tiebreak to the prelude candidate.

@yaahc yaahc force-pushed the core-std-macros-additions branch from b17cb42 to 03ee689 Compare December 2, 2025 01:05
&& matches!(orig_ident.name, sym::panic)
&& this.is_builtin_macro(binding.res())
&& this.is_builtin_macro(innermost_binding.res());
&& matches!(scope, Scope::StdLibPrelude)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this handles the case where we're firing on two globs where neither is from the implicit prelude import (the glob vs multiouter test) and turning it into a hard error. We probably want this to be a warning but I think the tiebreak logic as I wrote it may be broken in this case and depend on import expansion order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants