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 with proc_macro, attribute on crate #41331

Closed
gmorenz opened this issue Apr 16, 2017 · 1 comment
Closed

ICE with proc_macro, attribute on crate #41331

gmorenz opened this issue Apr 16, 2017 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@gmorenz
Copy link

gmorenz commented Apr 16, 2017

Code:

#![feature(proc_macro)]
#![fake]

fn main() {
    println!("Hello world!");
}

Output:

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: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/option.rs:329
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: syntax::ext::expand::MacroExpander::expand_crate
   1: rustc_driver::driver::phase_2_configure_and_expand::{{closure}}
   2: rustc_driver::driver::phase_2_configure_and_expand
   3: rustc_driver::driver::compile_input
   4: rustc_driver::run_compiler
   5: std::panicking::try::do_call
   6: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
   7: <F as alloc::boxed::FnBox<A>>::call_box
   8: std::sys::imp::thread::Thread::new::thread_start
             at /checkout/src/liballoc/boxed.rs:650
             at /checkout/src/libstd/sys_common/thread.rs:21
             at /checkout/src/libstd/sys/unix/thread.rs:84
   9: start_thread
  10: clone

Meta:

$ rustc --version --verbose
rustc 1.18.0-nightly (d5cf1cb64 2017-04-15)
binary: rustc
commit-hash: d5cf1cb64cd1948a8c289e29838716f03d49d5aa
commit-date: 2017-04-15
host: x86_64-unknown-linux-gnu
release: 1.18.0-nightly
LLVM version: 3.9
@Mark-Simulacrum
Copy link
Member

Duplicate of #41211.

@Mark-Simulacrum Mark-Simulacrum added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 16, 2017
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

2 participants