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 compiling lewton #37357

Closed
est31 opened this issue Oct 22, 2016 · 3 comments · Fixed by #37361
Closed

ICE when compiling lewton #37357

est31 opened this issue Oct 22, 2016 · 3 comments · Fixed by #37361
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@est31
Copy link
Member

est31 commented Oct 22, 2016

When on latest rust nightly f09420685 2016-10-20, you get an ICE when compiling lewton.

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:323
stack backtrace:
   1:     0x7f78233a903f - std::sys::backtrace::tracing::imp::write::h22f199c1dbb72ba2
   2:     0x7f78233b859d - std::panicking::default_hook::{{closure}}::h9a389c462b6a22dd
   3:     0x7f78233b59c6 - std::panicking::default_hook::h852b4223c1c00c59
   4:     0x7f78233b60a8 - std::panicking::rust_panic_with_hook::hcd9d05f53fa0dafc
   5:     0x7f78233b5f42 - std::panicking::begin_panic::hf6c488cee66e7f17
   6:     0x7f78233b5e80 - std::panicking::begin_panic_fmt::hb0a7126ee57cdd27
   7:     0x7f78233b5e01 - rust_begin_unwind
   8:     0x7f7823403f8f - core::panicking::panic_fmt::h9af671b78898cdba
   9:     0x7f7823403ebb - core::panicking::panic::h1a2d1a6b50eaa468
  10:     0x7f782299f63e - rustc_resolve::Resolver::resolve_module_path::he3d58c7c2b3cede9
  11:     0x7f78229a9439 - rustc_resolve::Resolver::resolve_path::h50912d8fbfa6340b
  12:     0x7f78229a8de8 - rustc_resolve::Resolver::resolve_possibly_assoc_item::h1e6fba50a34943a3
  13:     0x7f78229b2f5d - rustc_resolve::Resolver::resolve_pattern::{{closure}}::h4de63490e31f16d0
  14:     0x7f7822976efa - syntax::ast::Pat::walk::h007eb000795b4942
  15:     0x7f78229a65dd - rustc_resolve::Resolver::resolve_arm::hc9823a8a0b793db7
  16:     0x7f782297f61e - syntax::visit::walk_expr::hd41dc9e4032721dc
  17:     0x7f78229ae028 - rustc_resolve::Resolver::resolve_expr::hcad9be65fa81ebaf
  18:     0x7f78229a6373 - rustc_resolve::Resolver::resolve_local::h3c12c3dc9f1be5bd
  19:     0x7f78229a74cc - rustc_resolve::Resolver::resolve_block::h4374c692a6acfefb
  20:     0x7f78229ac7b5 - rustc_resolve::Resolver::resolve_expr::hcad9be65fa81ebaf
  21:     0x7f78229a74b5 - rustc_resolve::Resolver::resolve_block::h4374c692a6acfefb
  22:     0x7f782297f585 - syntax::visit::walk_expr::hd41dc9e4032721dc
  23:     0x7f78229ae028 - rustc_resolve::Resolver::resolve_expr::hcad9be65fa81ebaf
  24:     0x7f78229a74b5 - rustc_resolve::Resolver::resolve_block::h4374c692a6acfefb
  25:     0x7f78229ae028 - rustc_resolve::Resolver::resolve_expr::hcad9be65fa81ebaf
  26:     0x7f78229a74b5 - rustc_resolve::Resolver::resolve_block::h4374c692a6acfefb
  27:     0x7f78229ac7b5 - rustc_resolve::Resolver::resolve_expr::hcad9be65fa81ebaf
  28:     0x7f78229a74b5 - rustc_resolve::Resolver::resolve_block::h4374c692a6acfefb
  29:     0x7f78229ac07c - rustc_resolve::Resolver::resolve_expr::hcad9be65fa81ebaf
  30:     0x7f78229a74b5 - rustc_resolve::Resolver::resolve_block::h4374c692a6acfefb
  31:     0x7f78229a39bd - rustc_resolve::Resolver::resolve_function::ha0d1c19ce80ef5b9
  32:     0x7f782297f8bf - syntax::visit::walk_item::h395ea077a40162c7
  33:     0x7f78229a0b50 - rustc_resolve::Resolver::resolve_item::hcc157cba4cb08939
  34:     0x7f782297f8ef - syntax::visit::walk_item::h395ea077a40162c7
  35:     0x7f782299fb2d - rustc_resolve::Resolver::resolve_item::hcc157cba4cb08939
  36:     0x7f782299b6ff - rustc_resolve::Resolver::resolve_crate::h611e363ca5034f18
  37:     0x7f78237751ba - rustc_driver::driver::phase_2_configure_and_expand::{{closure}}::hce8b4e82876f8500
  38:     0x7f78237297cb - rustc_driver::driver::phase_2_configure_and_expand::h04526112c643cb41
  39:     0x7f78237210b1 - rustc_driver::driver::compile_input::h5b63ccd49eeeb98b
  40:     0x7f782374e1da - rustc_driver::run_compiler::h98c7274e7cb1d11d
  41:     0x7f782368ae0b - std::panicking::try::do_call::h99ed0da044e497c3
  42:     0x7f78233c0496 - __rust_maybe_catch_panic
  43:     0x7f78236a8951 - <F as alloc::boxed::FnBox<A>>::call_box::hbdd5a14cd8e33b97
  44:     0x7f78233b4420 - std::sys::thread::Thread::new::thread_start::h50b05608a499d2b2
  45:     0x7f781b673709 - start_thread
  46:     0x7f782307b0ae - __clone
  47:                0x0 - <unknown>

error: Could not compile `lewton`.

To learn more, run the command again with --verbose.
@est31
Copy link
Member Author

est31 commented Oct 22, 2016

Its a pretty recent regression, it can't be reproduced with 16eeeac78 2016-10-18.

@est31
Copy link
Member Author

est31 commented Oct 22, 2016

Okay, managed to minimize it:

macro_rules! eno {
    ($expr:expr) => (match $expr {
        $crate::std::result::Result::Ok(val) => (),
        $crate::std::result::Result::Err(_) => (),
    })
}
eno!(Ok(()));

Looks like a regression of #37213.

cc @jseyfried any ideas on this?

@TimNN TimNN added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 22, 2016
@jseyfried
Copy link
Contributor

@est31 Yeah, this was caused by an oversight in #37213 -- fixed in #37361.

bors added a commit that referenced this issue Oct 26, 2016
Fix `$crate`-related regressions

Fixes #37345, fixes #37357, fixes #37352, and improves the `unused_extern_crates` lint.
r? @nrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants