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

Compiler panic on nightly when using self in main.rs in nightly 1.25 #47623

Closed
IntrepidPig opened this issue Jan 20, 2018 · 1 comment
Closed
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@IntrepidPig
Copy link

When I add a use self statement to my main.rs file, the compiler panics.
This code:

use self;
fn main() {}

The compiler properly prints the error about using self in a use statement that doesn't use {}, but it also panics with this message:

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:335:21
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:68
             at libstd/sys_common/backtrace.rs:57
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:380
   3: std::panicking::default_hook
             at libstd/panicking.rs:390
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:576
   5: std::panicking::begin_panic
             at libstd/panicking.rs:537
   6: std::panicking::begin_panic_fmt
             at libstd/panicking.rs:521
   7: rust_begin_unwind
             at libstd/panicking.rs:497
   8: core::panicking::panic_fmt
             at libcore/panicking.rs:71
   9: core::panicking::panic
             at libcore/panicking.rs:51
  10: rustc::hir::lowering::LoweringContext::lower_use_tree
  11: rustc::hir::lowering::LoweringContext::lower_item
  12: <rustc::hir::lowering::LoweringContext::lower_crate::ItemLowerer<'lcx, 'interner> as syntax::visit::Visitor<'lcx>>::visit_item
  13: rustc::hir::lowering::lower_crate
  14: rustc::util::common::time
  15: rustc_driver::driver::compile_input
  16: rustc_driver::run_compiler

Version:

rustc 1.25.0-nightly (5965b7901 2018-01-19)
binary: rustc
commit-hash: 5965b790142eff7a8546e947914e7a8e00c61575
commit-date: 2018-01-19
host: x86_64-unknown-linux-gnu
release: 1.25.0-nightly
LLVM version: 4.0
@pietroalbini
Copy link
Member

I'll take a look at this tomorrow (it seems to be related with my PR for use_nested_groups).

@sfackler sfackler added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 21, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jan 21, 2018
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

3 participants