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 when variable shadows ::-qualified use'd crate #56263

Closed
illicitonion opened this Issue Nov 27, 2018 · 3 comments

Comments

Projects
4 participants
@illicitonion
Copy link

illicitonion commented Nov 27, 2018

Minimal repro at https://github.com/illicitonion/cargo-2018-use-repro

Occurs both in beta and nightly.

$ git clone https://github.com/illicitonion/cargo-2018-use-repro.git
$ rustc +nightly --version
rustc 1.32.0-nightly (6acbb5b65 2018-11-25)
$ cargo +nightly --version
cargo 1.32.0-nightly (b3d0b2e54 2018-11-15)
$ RUST_BACKTRACE=1 cargo +nightly build --verbose
       Fresh indexmap v1.0.2
   Compiling rust-use-repro v0.0.1 (/home/dwh/tmp/rustplay)
     Running `rustc --edition=2018 --crate-name rust_use_repro src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=0e6cedb7e581324a -C extra-filename=-0e6cedb7e581324a --out-dir /home/dwh/tmp/rustplay/target/debug/deps -C incremental=/home/dwh/tmp/rustplay/target/debug/incremental -L dependency=/home/dwh/tmp/rustplay/target/debug/deps --extern indexmap=/home/dwh/tmp/rustplay/target/debug/deps/libindexmap-4f9d100201616fe2.rlib`
thread 'main' panicked at 'src/librustc_resolve/lib.rs:3027: unexpected definition for an identifier in pattern: Mod(DefId(8/0:0))', src/librustc/util/bug.rs:47:26
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:211
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:227
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:480
   6: std::panicking::begin_panic
   7: rustc::util::bug::opt_span_bug_fmt::{{closure}}
   8: rustc::ty::context::tls::with_opt::{{closure}}
   9: rustc::ty::context::tls::with_context_opt
  10: rustc::ty::context::tls::with_opt
  11: rustc::util::bug::opt_span_bug_fmt
  12: rustc::util::bug::span_bug_fmt
  13: syntax::ast::Pat::walk
  14: <rustc_resolve::Resolver<'a, 'cl> as syntax::visit::Visitor<'tcx>>::visit_local
  15: <rustc_resolve::Resolver<'a, 'cl> as syntax::visit::Visitor<'tcx>>::visit_block
  16: <rustc_resolve::Resolver<'a, 'cl> as syntax::visit::Visitor<'tcx>>::visit_fn
  17: syntax::visit::walk_item
  18: rustc_resolve::Resolver::resolve_item
  19: rustc_resolve::Resolver::resolve_crate
  20: rustc::util::common::time
  21: rustc_driver::driver::phase_2_configure_and_expand
  22: rustc_driver::driver::compile_input
  23: rustc_driver::run_compiler_with_pool
  24: <scoped_tls::ScopedKey<T>>::set
  25: rustc_driver::run_compiler
  26: syntax::with_globals
  27: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  28: rustc_driver::run
  29: rustc_driver::main
  30: std::rt::lang_start::{{closure}}
  31: std::panicking::try::do_call
             at src/libstd/rt.rs:59
             at src/libstd/panicking.rs:310
  32: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  33: std::rt::lang_start_internal
             at src/libstd/panicking.rs:289
             at src/libstd/panic.rs:398
             at src/libstd/rt.rs:58
  34: main
  35: __libc_start_main
  36: <unknown>
query stack during panic:
end of query stack

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.32.0-nightly (6acbb5b65 2018-11-25) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `rust-use-repro`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name rust_use_repro src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=0e6cedb7e581324a -C extra-filename=-0e6cedb7e581324a --out-dir /home/dwh/tmp/rustplay/target/debug/deps -C incremental=/home/dwh/tmp/rustplay/target/debug/incremental -L dependency=/home/dwh/tmp/rustplay/target/debug/deps --extern indexmap=/home/dwh/tmp/rustplay/target/debug/deps/libindexmap-4f9d100201616fe2.rlib` (exit code: 101)
@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Nov 27, 2018

Fixed in #56264

@petrochenkov petrochenkov moved this from Triaged to Fix in progress in 1.31 regressions Nov 27, 2018

bors added a commit that referenced this issue Nov 27, 2018

Auto merge of #56264 - petrochenkov:typonly, r=nikomatsakis
resolve: Extern prelude is for type namespace only

Fixes #56263 (stable-to-beta regression)

@bors bors closed this in #56264 Nov 27, 2018

@petrochenkov petrochenkov moved this from Fix in progress to Backport in progress in 1.31 regressions Nov 28, 2018

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Nov 29, 2018

reopening to ensure we only close this after beta backport lands.

@pnkfelix pnkfelix reopened this Nov 29, 2018

1.31 regressions automation moved this from Backport in progress to Triaged Nov 29, 2018

@alexcrichton alexcrichton moved this from Triaged to Backport in progress in 1.31 regressions Nov 29, 2018

@alexcrichton alexcrichton added this to the Rust 2018 Release milestone Nov 29, 2018

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Nov 29, 2018

This is now tracked at #56352 and this won't get auto-closed when that merges because github only does that for the master branch, so I'm going to go ahead and close this in favor of that PR.

bors added a commit that referenced this issue Nov 29, 2018

Auto merge of #56352 - alexcrichton:beta-next, r=alexcrichton
Rollup beta backports

* #56264
* #56300
* #56322
* #56329

Neither #56300 nor #56329 applied cleanly, but I think I've gotten it working with @nikic's [help](#56300 (comment)) (thanks!)

Closes #56311
Closes #56263

bors added a commit that referenced this issue Nov 30, 2018

Auto merge of #56352 - alexcrichton:beta-next, r=alexcrichton
Rollup beta backports

* #56264
* #56300
* #56322
* #56329

Neither #56300 nor #56329 applied cleanly, but I think I've gotten it working with @nikic's [help](#56300 (comment)) (thanks!)

Closes #56311
Closes #56263

@alexcrichton alexcrichton moved this from Backport in progress to Fixed in 1.31 regressions Nov 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.