Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

macro_export crashes compiler on nightly #37819

Closed
MasonRemaley opened this issue Nov 17, 2016 · 1 comment
Closed

macro_export crashes compiler on nightly #37819

MasonRemaley opened this issue Nov 17, 2016 · 1 comment

Comments

@MasonRemaley
Copy link

I'm trying to export a macro. On beta it compiles without error, but on nightly it crashes. Let me know if you have any trouble recreating the crash or need any more info about my setup.

I tried this code:

// This is the full contents of lib.rs
#[macro_export]
macro_rules! foo { () => (()) }

Meta

rustc --version --verbose:

rustc 1.15.0-nightly (43006fcea 2016-11-15)
binary: rustc
commit-hash: 43006fcea0066a935b657fff9ccef56983cbf56c
commit-date: 2016-11-15
host: x86_64-apple-darwin
release: 1.15.0-nightly
LLVM version: 3.9

Backtrace:

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 'no entry found for key', ../src/libcore/option.rs:705
stack backtrace:
   1:        0x10dfa34ea - std::sys::imp::backtrace::tracing::imp::write::h944c02ac40aee2d7
   2:        0x10dfb077f - std::panicking::default_hook::{{closure}}::h6875a2976258b020
   3:        0x10dfb032d - std::panicking::default_hook::h88ffbc5922643264
   4:        0x10dfb0c46 - std::panicking::rust_panic_with_hook::ha5aed1dfc0e220e3
   5:        0x10dfb0ae4 - std::panicking::begin_panic::hc066339e2fdc17d1
   6:        0x10dfb0a02 - std::panicking::begin_panic_fmt::h5912b2d2df332044
   7:        0x10dfb0967 - rust_begin_unwind
   8:        0x10dff2aa0 - core::panicking::panic_fmt::h561c5ee168a3d2cb
   9:        0x10dff2b0d - core::option::expect_failed::h6be288f6c3caa41a
  10:        0x10a86d018 - <rustc_incremental::calculate_svh::IncrementalHashesMap as core::ops::Index<&'a rustc::dep_graph::dep_node::DepNode<rustc::hir::def_id::DefId>>>::index::hfb9f68bd7c3a82d2
  11:        0x10a87c2b6 - rustc_incremental::persist::hash::HashContext::hash::h9d2f063fe38bcd58
  12:        0x10a8890a9 - rustc_incremental::persist::save::save_dep_graph::h8ad44fda4512c5f8
  13:        0x1098addb0 - rustc_driver::driver::phase_4_translate_to_llvm::h48ed91c172294403
  14:        0x10987e21c - rustc_driver::driver::compile_input::{{closure}}::hf13172fc4e5a2f4d
  15:        0x10989bc7b - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::h97a3a12d948df547
  16:        0x109894edd - rustc_driver::driver::phase_3_run_analysis_passes::hb0ad9de18d423e67
  17:        0x10987c725 - rustc_driver::driver::compile_input::h8e119234b60571d5
  18:        0x1098c21b9 - rustc_driver::run_compiler::hbdfc4f84e2e0f4b9
  19:        0x1097e14e8 - std::panicking::try::do_call::hf679f17bf3b43b0b
  20:        0x10dfb31fa - __rust_maybe_catch_panic
  21:        0x10980560f - <F as alloc::boxed::FnBox<A>>::call_box::h506fb5d7b8891cd4
  22:        0x10dfaf8d4 - std::sys::imp::thread::Thread::new::thread_start::h8084b1107992ae5b
  23:     0x7fffbc19daaa - _pthread_body
  24:     0x7fffbc19d9f6 - _pthread_start

error: Could not compile `testlib`.

To learn more, run the command again with --verbose.
@jseyfried
Copy link
Contributor

Thanks for the report! Closing as a duplicate of #37756, should be fixed once #37787 lands.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants