Closed
Description
When trying to compile #36791, I ran into the following ICE:
rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore
error: internal compiler error: ../src/librustc/traits/specialize/mod.rs:130: find_method: translate_substs returned Substs { params: ['_#0r, slice::Iter<u8>, u8] } which contains inference types/regions
Backtrace:
thread 'rustc' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:656
stack backtrace:
1: 0x38ff588b5bf - std::sys::backtrace::tracing::imp::write::h15f4dcb9fc5cc76b
2: 0x38ff589aacd - std::panicking::default_hook::{{closure}}::h122a1c9dfacef96f
3: 0x38ff5897f8e - std::panicking::default_hook::h9cf83dcedc626223
4: 0x38ff5898678 - std::panicking::rust_panic_with_hook::hc99436623a03228e
5: 0x38fef05b5a7 - std::panicking::begin_panic::h17785a79ba05422e
6: 0x38fef06b628 - rustc_errors::Handler::bug::h5d05e16f0218d91b
7: 0x38ff2d4092a - rustc::session::opt_span_bug_fmt::{{closure}}::h213520e1e2445968
8: 0x38ff2c80d75 - rustc::session::opt_span_bug_fmt::hc102cf6a330247e9
9: 0x38ff2c80bb2 - rustc::session::bug_fmt::h211c71ac4131f84b
10: 0x38ff2cb19b5 - rustc::traits::specialize::find_method::ha6bb912c0ad9a39f
11: 0x38ff44831a9 - rustc_trans::collector::do_static_dispatch::hc550d11e69c0f037
12: 0x38ff4482539 - <rustc_trans::collector::MirNeighborCollector<'a, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_operand::h73bc105d34a3f8ca
13: 0x38ff4482e49 - <rustc_trans::collector::MirNeighborCollector<'a, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_terminator_kind::h03056abb13083520
14: 0x38ff4414d95 - rustc::mir::visit::Visitor::visit_mir::h9178e76484decc93
15: 0x38ff44802e2 - rustc_trans::collector::collect_items_rec::h11e2a54fada9d7ec
16: 0x38ff44f1be2 - rustc_trans::base::collect_and_partition_translation_items::{{closure}}::h4c634b3f9d52d409
17: 0x38ff4468088 - rustc_trans::base::collect_and_partition_translation_items::h9ba3b316253a0b6d
18: 0x38ff44627bc - rustc_trans::base::trans_crate::hdcdc2e81a006e15c
19: 0x38ff5c1de1d - rustc_driver::driver::phase_4_translate_to_llvm::h6ab5f49542a71b7c
20: 0x38ff5c5923a - rustc_driver::driver::compile_input::{{closure}}::h0bbc2feaa811e66f
21: 0x38ff5c4a613 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::h5dabeea7050cf7c2
22: 0x38ff5c1b7bd - rustc_driver::driver::phase_3_run_analysis_passes::h79f20d1127b1dfba
23: 0x38ff5c07f79 - rustc_driver::driver::compile_input::h8ef818979445c42c
24: 0x38ff5c32616 - rustc_driver::run_compiler::ha981cef7568b5eb8
25: 0x38ff5b6d2a3 - std::panicking::try::do_call::h4a286c81408a0d92
26: 0x38ff58a29c6 - __rust_maybe_catch_panic
27: 0x38ff5b8c499 - <F as alloc::boxed::FnBox<A>>::call_box::h5de1378b9690a33a
28: 0x38ff58969e0 - std::sys::thread::Thread::new::thread_start::h2eacc7b7061d5d8c
29: 0x38fee807453 - start_thread
30: 0x38ff55677de - __GI___clone
31: 0x0 - <unknown>
Unfortunately, I don't have a minimal example to reproduce this that doesn't require rebuilding core.