-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE: inconsistent resolution for an import
#128813
Labels
A-resolve
Area: Name resolution
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Naserume
added
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Aug 8, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Aug 8, 2024
jieyouxu
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Aug 13, 2024
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Aug 21, 2024
Rollup merge of rust-lang#128932 - bvanjoi:issue-128813, r=petrochenkov skip updating when external binding is existed Fixes rust-lang#128813 For following code: ```rs extern crate core; fn f() { use ::core; } macro_rules! m { () => { extern crate std as core; }; } m!(); fn main() {} ``` - In the first loop, we define `extern crate core` and `use ::core` will be referred to `core` (yes, it does not consider if there are some macros that are not expanded. Ideally, this should be delayed if there are some unexpanded macros in the root, but I didn't change it like that because it seems like a huge change). - Then `m` is expanded, which makes `extern_prelude('core')` return `std` rather than `core`, causing the inconsistency. r? `@petrochenkov`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-resolve
Area: Name resolution
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
command:
rustc ./file.rs --edition=2021
Meta
rustc --version --verbose
:Error output
Backtrace
Note
ICE location:
rust/compiler/rustc_resolve/src/imports.rs
Lines 1085 to 1101 in 60d1465
The text was updated successfully, but these errors were encountered: