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 using inner proc_macro_attribute on crate root #41322

Closed
mystor opened this issue Apr 15, 2017 · 2 comments
Closed

ICE when using inner proc_macro_attribute on crate root #41322

mystor opened this issue Apr 15, 2017 · 2 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@mystor
Copy link
Contributor

mystor commented Apr 15, 2017

There seems to be an ICE which occurs when using an inner proc_macro_attribute on the crate root.

Reproduction crate: https://github.com/mystor/rustc_ice_15042017

Build log:

mlayzell@mlayzell rustc_ice_15042017
$ rustc --version
rustc 1.18.0-nightly (bbdaad0dc 2017-04-14)

mlayzell@mlayzell rustc_ice_15042017
$ RUST_BACKTRACE=1 cargo build
   Compiling rustc_ice_15042017_macro v0.1.0 (file:///Volumes/Devel/Code/rustc_ice_15042017/rustc_ice_15042017_macro)
   Compiling rustc_ice_15042017 v0.1.0 (file:///Volumes/Devel/Code/rustc_ice_15042017)
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', 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
   7: <F as alloc::boxed::FnBox<A>>::call_box
   8: std::sys::imp::thread::Thread::new::thread_start
   9: _pthread_body
  10: _pthread_start

error: Could not compile `rustc_ice_15042017`.

To learn more, run the command again with --verbose.
@Mark-Simulacrum Mark-Simulacrum added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 15, 2017
@abonander
Copy link
Contributor

Duplicate of #41211.

@Mark-Simulacrum
Copy link
Member

Closing as duplicate.

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