Skip to content
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: librustc_resolve/lib.rs:2853: unexpected definition for an identifier in pattern: Mod(DefId(10/0:0)) #53333

Closed
eddyb opened this issue Aug 14, 2018 · 0 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@eddyb
Copy link
Member

eddyb commented Aug 14, 2018

Reported by @Manishearth in #52923 (comment):

   Compiling clippy_lints v0.0.212 (file:///home/manishearth/mozilla/Wall/rust-clippy/clippy_lints)
thread 'main' panicked at 'librustc_resolve/lib.rs:2853: unexpected definition for an identifier in pattern: Mod(DefId(10/0:0))', librustc/util/bug.rs:47:26
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: internal compiler error: unexpected panic

Minimal reproduction (with --edition=2018):

fn main() {
    use std;
    let std = "std";
    println!("{}", std);
}
@eddyb eddyb added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Aug 14, 2018
bors added a commit that referenced this issue Aug 14, 2018
rustc_resolve: crates only exist in the type namespace.

Fixes #53333 by resolving `::crate_name` in `TypeNS` alone, which was overlooked in #52923 and didn't break tests, since having `use crate_name;` and a `crate_name` value in the same scope is rare.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

1 participant