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

rustc internal compiler error: bad placeholder type #68162

Closed
heilhead opened this issue Jan 12, 2020 · 3 comments · Fixed by #68237
Closed

rustc internal compiler error: bad placeholder type #68162

heilhead opened this issue Jan 12, 2020 · 3 comments · Fixed by #68237
Assignees
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@heilhead
Copy link

heilhead commented Jan 12, 2020

The following code causes a compiler crash:

extern crate spin;

fn main() {
    static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
    SINGLETON_STATIC.call_once(|| 0u32);
}

Replacing spin::Once<_> with spin::Once<u32> works properly.

Rust version:

rustc 1.42.0-nightly (859764425 2020-01-07)
binary: rustc
commit-hash: 85976442558bf2d09cec3aa49c9c9ba86fb15c1f
commit-date: 2020-01-07
host: x86_64-pc-windows-msvc
release: 1.42.0-nightly
LLVM version: 9.0

Full output:

C:\git\rust-macro-crash>cargo build
   Compiling rust-macro-crash v0.1.0 (C:\git\rust-macro-crash)
warning: unused variable: `bar1`
 --> src\main.rs:8:9
  |
8 |     let bar1: &u32 = {
  |         ^^^^ help: consider prefixing with an underscore: `_bar1`
  |
  = note: `#[warn(unused_variables)]` on by default

thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', /rustc/85976442558bf2d09cec3aa49c9c9ba86fb15c1f\src\libcore\slice\mod.rs:2791:10
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: <std::io::IoSlice as core::fmt::Debug>::fmt
   3: std::panicking::take_hook
   4: std::panicking::take_hook                                                                                                                                                      
   5: rustc_driver::report_ice
   6: std::panicking::rust_panic_with_hook
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic_bounds_check
  10: <rustc_mir::borrow_check::type_check::relate_tys::NllTypeRelatingDelegate as rustc::infer::nll_relate::TypeRelatingDelegate>::push_domain_goal
  11: <rustc_mir::borrow_check::invalidation::InvalidationGenerator as rustc::mir::visit::Visitor>::visit_terminator_kind
  12: <rustc_mir::hair::pattern::PatRange as core::fmt::Debug>::fmt
  13: <rustc_mir::borrow_check::region_infer::RegionRelationCheckResult as core::fmt::Debug>::fmt
  14: <rustc_mir::hair::pattern::PatRange as core::fmt::Debug>::fmt
  15: <rustc_interface::util::ReplaceBodyWithLoop as syntax::mut_visit::MutVisitor>::visit_mac
  16: <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item
  17: <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item
  18: <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item
  19: <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item
  20: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::compile
  21: rustc_interface::passes::QueryContext::print_stats
  22: <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt
  23: rustc_driver::pretty::print_after_hir_lowering
  24: <rustc_driver::Compilation as core::fmt::Debug>::fmt
  25: rustc_driver::pretty::print_after_hir_lowering
  26: rustc_driver::pretty::print_after_hir_lowering
  27: <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt
  28: <rustc_driver::Compilation as core::fmt::Debug>::fmt
  29: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
  30: _rust_maybe_catch_panic
  31: rustc_driver::pretty::print_after_hir_lowering
  32: ZN244_$LT$std..error..$LT$impl$u20$core..convert..From$LT$alloc..string..String$GT$$u20$for$u20$alloc..boxed..Box$LT$dyn$u20$std..error..Error$u2b$core..marker..Send$u2b$core..marker..Sync$GT$$GT$..from..StringError$u20$as$u20$core..fmt..Display$GT$3fmt17
  33: std::sys::windows::thread::Thread::new
  34: BaseThreadInitThunk                                                                                                                                                            
  35: RtlUserThreadStart
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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: rustc 1.42.0-nightly (859764425 2020-01-07) running on x86_64-pc-windows-msvc

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [mir_borrowck] processing `main::{{closure}}#0`
#1 [analysis] running analysis passes on this crate
end of query stack
error: internal compiler error: bad placeholder type
 --> src\main.rs:9:45
  |
9 |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
  |                                             ^

error: internal compiler error: cat_expr Errd
 --> src\main.rs:9:50
  |
9 |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
  |                                                  ^^^^^^^^^^^^^^^^^

error: internal compiler error: cat_expr Errd
 --> src\main.rs:9:50
  |
9 |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
  |                                                  ^^^^^^^^^^^^^^^

error: internal compiler error: cat_expr Errd
  --> src\main.rs:7:11
   |
7  |   fn main() {
   |  ___________^
8  | |     let bar1: &u32 = {
9  | |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
10 | |         SINGLETON_STATIC.call_once(|| test())
11 | |     };
12 | | }
   | |_^

error: internal compiler error: cat_expr Errd
  --> src\main.rs:8:22
   |
8  |       let bar1: &u32 = {
   |  ______________________^
9  | |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
10 | |         SINGLETON_STATIC.call_once(|| test())
11 | |     };
   | |_____^

error: internal compiler error: cat_expr Errd
  --> src\main.rs:10:9
   |
10 |         SINGLETON_STATIC.call_once(|| test())
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: internal compiler error: cat_expr Errd
  --> src\main.rs:10:9
   |
10 |         SINGLETON_STATIC.call_once(|| test())
   |         ^^^^^^^^^^^^^^^^

error: internal compiler error: cat_expr Errd
  --> src\main.rs:10:36
   |
10 |         SINGLETON_STATIC.call_once(|| test())
   |                                    ^^^^^^^^^

error: internal compiler error: PromoteTemps: MIR had errors
  --> src\main.rs:7:1
   |
7  | / fn main() {
8  | |     let bar1: &u32 = {
9  | |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
10 | |         SINGLETON_STATIC.call_once(|| test())
11 | |     };
12 | | }
   | |_^

error: internal compiler error: broken MIR in DefId(0:5 ~ rust_macro_crash[4413]::main[0]) ("return type"): bad type [type error]
  --> src\main.rs:7:1
   |
7  | / fn main() {
8  | |     let bar1: &u32 = {
9  | |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
10 | |         SINGLETON_STATIC.call_once(|| test())
11 | |     };
12 | | }
   | |_^

error: internal compiler error: broken MIR in DefId(0:5 ~ rust_macro_crash[4413]::main[0]) (LocalDecl { mutability: Mut, local_info: Other, internal: false, is_block_tail: None, ty: [type error], user_ty: UserTypeProjections { contents: [] }, source_info: SourceInfo { span: src\main.rs:7:1: 12:2, scope: scope[0] } }): bad type [type error]
  --> src\main.rs:7:1
   |
7  | / fn main() {
8  | |     let bar1: &u32 = {
9  | |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
10 | |         SINGLETON_STATIC.call_once(|| test())
11 | |     };
12 | | }
   | |_^

error: internal compiler error: mir_const_qualif: MIR had errors
 --> src\main.rs:9:9
  |
9 |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: internal compiler error: PromoteTemps: MIR had errors
 --> src\main.rs:9:9
  |
9 |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: internal compiler error: broken MIR in DefId(0:6 ~ rust_macro_crash[4413]::main[0]::SINGLETON_STATIC[0]) ("return type"): bad type [type error]
 --> src\main.rs:9:9
  |
9 |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: internal compiler error: broken MIR in DefId(0:6 ~ rust_macro_crash[4413]::main[0]::SINGLETON_STATIC[0]) (LocalDecl { mutability: Mut, local_info: Other, internal: false, is_block_tail: None, ty: [type error], user_ty: UserTypeProjections { contents: [] }, source_info: SourceInfo { span: src\main.rs:9:9: 9:68, scope: scope[0] } }): bad type [type error] --> src\main.rs:9:9
  |
9 |         static SINGLETON_STATIC: spin::Once<_> = spin::Once::new();
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: internal compiler error: PromoteTemps: MIR had errors
  --> src\main.rs:10:36
   |
10 |         SINGLETON_STATIC.call_once(|| test())
   |                                    ^^^^^^^^^

error: internal compiler error: broken MIR in DefId(0:7 ~ rust_macro_crash[4413]::main[0]::{{closure}}[0]) ("return type"): bad type [type error]
  --> src\main.rs:10:36
   |
10 |         SINGLETON_STATIC.call_once(|| test())
   |                                    ^^^^^^^^^

error: internal compiler error: broken MIR in DefId(0:7 ~ rust_macro_crash[4413]::main[0]::{{closure}}[0]) (LocalDecl { mutability: Mut, local_info: Other, internal: false, is_block_tail: None, ty: [type error], user_ty: UserTypeProjections { contents: [] }, source_info: SourceInfo { span: src\main.rs:10:36: 10:45, scope: scope[0] } }): bad type [type error]  
  --> src\main.rs:10:36
   |
10 |         SINGLETON_STATIC.call_once(|| test())
   |                                    ^^^^^^^^^

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src\librustc_errors\lib.rs:347:17
stack backtrace:
   0:     0x7ff9d2b97449 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1095fd65914af34d
   1:     0x7ff9d2bc1cdb - core::fmt::write::hdc7c54b3d580259b
   2:     0x7ff9d2b89174 - <std::io::IoSlice as core::fmt::Debug>::fmt::h8b3edc617bb370a8
   3:     0x7ff9d2b9ba29 - std::panicking::take_hook::h9fa2030209e90419
   4:     0x7ff9d2b9b67c - std::panicking::take_hook::h9fa2030209e90419
   5:     0x7ff995034d54 - rustc_driver::report_ice::hfd255ef72e41bb17
   6:     0x7ff9d2b9c1fc - std::panicking::rust_panic_with_hook::hfa2b7b16fa988648
   7:     0x7ff998983a7d - rustc_errors::diagnostic_builder::DiagnosticBuilder::code::hd1da51d03c05e5b2
   8:     0x7ff99897de7d - <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop::hb582a2593a041559
   9:     0x7ff995008a77 - rustc_driver::pretty::print_after_hir_lowering::h3ec854b3772266dc
  10:     0x7ff994fef356 - rustc_driver::pretty::print_after_hir_lowering::h3ec854b3772266dc
  11:     0x7ff994fefa3c - rustc_driver::pretty::print_after_hir_lowering::h3ec854b3772266dc
  12:     0x7ff994feab2f - rustc_driver::pretty::print_after_hir_lowering::h3ec854b3772266dc
  13:     0x7ff998adc2b0 - _rust_realloc
  14:     0x7ff998adbb0b - _rust_realloc
  15:     0x7ff998ad9834 - _rust_realloc
  16:     0x7ff998adb64e - _rust_realloc
  17:     0x7ff998ad9ce5 - _rust_realloc
  18:     0x7ffa02c7018f - _chkstk
  19:     0x7ffa02bf1c56 - RtlUnwindEx
  20:     0x7ff9d2be1da5 - <libc::windows::timeval as core::clone::Clone>::clone::hdd1a8d652a4825ad
  21:     0x7ff9d2be2bcc - <libc::windows::timeval as core::clone::Clone>::clone::hdd1a8d652a4825ad
  22:     0x7ff9d2be2ec3 - <libc::windows::timeval as core::clone::Clone>::clone::hdd1a8d652a4825ad
  23:     0x7ff9d2be35e0 - <libc::windows::timeval as core::clone::Clone>::clone::hdd1a8d652a4825ad
  24:     0x7ff9d2be1f15 - <libc::windows::timeval as core::clone::Clone>::clone::hdd1a8d652a4825ad
  25:     0x7ffa02c7010f - _chkstk
  26:     0x7ffa02c1b4e4 - RtlRaiseException
  27:     0x7ffa02c1b235 - RtlRaiseException
  28:     0x7ffa00473e49 - RaiseException
  29:     0x7ff9d2be227d - <libc::windows::timeval as core::clone::Clone>::clone::hdd1a8d652a4825ad
  30:     0x7ff9d2badb03 - _rust_start_panic
  31:     0x7ff9d2badaa9 - _rust_start_panic
  32:     0x7ff9d2b9c3a8 - rust_panic
  33:     0x7ff9d2b9c289 - std::panicking::rust_panic_with_hook::hfa2b7b16fa988648
  34:     0x7ff9d2b9bd85 - rust_begin_unwind
  35:     0x7ff9d2bbe72d - core::panicking::panic_fmt::he62b30d85e14e28b
  36:     0x7ff9d2bbe6fa - core::panicking::panic_bounds_check::haf6d164417db1d4f
  37:     0x7ff997900455 - <rustc_mir::borrow_check::type_check::relate_tys::NllTypeRelatingDelegate as rustc::infer::nll_relate::TypeRelatingDelegate>::push_domain_goal::hc44aec63dda54d8f
  38:     0x7ff99786b49b - <rustc_mir::borrow_check::invalidation::InvalidationGenerator as rustc::mir::visit::Visitor>::visit_terminator_kind::h46a43fcdd4c80d94
  39:     0x7ff9979cc73d - <rustc_mir::hair::pattern::PatRange as core::fmt::Debug>::fmt::h30d0464933b99dc9
  40:     0x7ff9976901a6 - <rustc_mir::borrow_check::region_infer::RegionRelationCheckResult as core::fmt::Debug>::fmt::haf3327dcc27fe819
  41:     0x7ff9979cbaf0 - <rustc_mir::hair::pattern::PatRange as core::fmt::Debug>::fmt::h30d0464933b99dc9
  42:     0x7ff9951301a5 - <rustc_interface::util::ReplaceBodyWithLoop as syntax::mut_visit::MutVisitor>::visit_mac::h047bd519f96a8ef1
  43:     0x7ff9951c1fe1 - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h043738651f239b7d
  44:     0x7ff99520739a - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h043738651f239b7d
  45:     0x7ff9951d88af - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h043738651f239b7d
  46:     0x7ff9951c1d5a - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h043738651f239b7d
  47:     0x7ff9951931d4 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::compile::hb9e9d8f7f406580e
  48:     0x7ff99513c713 - rustc_interface::passes::QueryContext::print_stats::h783268cfacc38309
  49:     0x7ff994fc0833 - <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt::h9f9d88cdcd88c47f
  50:     0x7ff99501429d - rustc_driver::pretty::print_after_hir_lowering::h3ec854b3772266dc
  51:     0x7ff99503ced7 - <rustc_driver::Compilation as core::fmt::Debug>::fmt::hf4d2a3fdc72fd02c
  52:     0x7ff99501141d - rustc_driver::pretty::print_after_hir_lowering::h3ec854b3772266dc
  53:     0x7ff994fe9daf - rustc_driver::pretty::print_after_hir_lowering::h3ec854b3772266dc
  54:     0x7ff994fc48ce - <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt::h9f9d88cdcd88c47f
  55:     0x7ff995041819 - <rustc_driver::Compilation as core::fmt::Debug>::fmt::hf4d2a3fdc72fd02c
  56:     0x7ff994fbe0ac - <env_logger::filter::inner::Filter as core::fmt::Display>::fmt::hab669cf4fa09e2c5
  57:     0x7ff9d2bada32 - _rust_maybe_catch_panic
  58:     0x7ff994fcdf22 - rustc_driver::pretty::print_after_hir_lowering::h3ec854b3772266dc
  59:     0x7ff9d2b779c7 - ZN244_$LT$std..error..$LT$impl$u20$core..convert..From$LT$alloc..string..String$GT$$u20$for$u20$alloc..boxed..Box$LT$dyn$u20$std..error..Error$u2b$core..marker..Send$u2b$core..marker..Sync$GT$$GT$..from..StringError$u20$as$u20$core..fmt..Display$GT$3fmt17
  60:     0x7ff9d2bab2f7 - std::sys::windows::thread::Thread::new::h9e5104b131d416be
  61:     0x7ffa014a6fd4 - BaseThreadInitThunk
  62:     0x7ffa02c1cf31 - RtlUserThreadStart

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: rustc 1.42.0-nightly (859764425 2020-01-07) running on x86_64-pc-windows-msvc

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
error: could not compile `rust-macro-crash`.

Caused by:
  process didn't exit successfully: `rustc --crate-name rust_macro_crash --edition=2018 src\main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=7766437149f6ecd8 --out-dir C:\git\rust-macro-crash\target\debug\deps -C incremental=C:\git\rust-macro-crash\target\debug\incremental -L dependency=C:\git\rust-macro-crash\target\debug\deps --extern spin=C:\git\rust-macro-crash\target\debug\deps\libspin-135b72c82d3f63ac.rlib` (exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)
@JohnTitor JohnTitor added A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 13, 2020
@hellow554
Copy link
Contributor

hellow554 commented Jan 13, 2020

Minified:

fn one() -> u32 {
    1   
}

fn main() {
    static SOME_STATIC: Option<_> = unimplemented!();
    SOME_STATIC.map(|_| one());
}

@rustbot modify labels: -E-needs-mcve E-needs-bisection requires-nightly

@rustbot rustbot added E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc requires-nightly This issue requires a nightly compiler in some way. and removed E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Jan 13, 2020
@hellow554
Copy link
Contributor

hellow554 commented Jan 13, 2020

regression in 71bb0ff

@rustbot modify labels: -E-needs-bisection

CC #67597
ping @estebank

@rustbot rustbot removed the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Jan 13, 2020
@hellow554
Copy link
Contributor

Another ICE, which is very related and should be added as a seperate testcase is this:

fn one(_: u32) -> u32 {
    1
}

fn main() {
    static SOME_STATIC: Option<_> = unimplemented!();
    SOME_STATIC.map(one);
}
error: internal compiler error: src/librustc_passes/dead.rs:111: no type-dependent def for method

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:892:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1057
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1426
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:195
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:215
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:467
  12: std::panicking::begin_panic
  13: rustc_errors::HandlerInner::bug
  14: rustc_errors::Handler::bug
  15: rustc::util::bug::opt_span_bug_fmt::{{closure}}
  16: rustc::ty::context::tls::with_opt::{{closure}}
  17: rustc::ty::context::tls::with_opt
  18: rustc::util::bug::opt_span_bug_fmt
  19: rustc::util::bug::bug_fmt
  20: <rustc_passes::dead::MarkSymbolVisitor as rustc::hir::intravisit::Visitor>::visit_expr
  21: rustc::hir::intravisit::walk_expr
  22: rustc::hir::intravisit::walk_fn
  23: rustc::hir::intravisit::walk_item
  24: rustc_passes::dead::check_crate
  25: rustc_session::utils::<impl rustc_session::session::Session>::time
  26: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:79
  27: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  28: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:79
  29: rustc_session::utils::<impl rustc_session::session::Session>::time
  30: rustc_interface::passes::analysis
  31: rustc::ty::query::__query_compute::analysis
  32: rustc::dep_graph::graph::DepGraph::with_task_impl
  33: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  34: rustc::ty::context::tls::enter_global
  35: rustc_interface::interface::run_compiler_in_existing_thread_pool
  36: scoped_tls::ScopedKey<T>::set
  37: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: rustc 1.42.0-nightly (859764425 2020-01-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

@jonas-schievink jonas-schievink added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. requires-nightly This issue requires a nightly compiler in some way. and removed requires-nightly This issue requires a nightly compiler in some way. labels Jan 13, 2020
@estebank estebank self-assigned this Jan 13, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Jan 15, 2020
Account for `Path`s in `is_suggestable_infer_ty`

Fix rust-lang#68162.
@bors bors closed this as completed in 268a1ff Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. requires-nightly This issue requires a nightly compiler in some way. 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.

6 participants