Closed
Description
Code:
#![feature(associated_consts)]
use std::marker::PhantomData;
trait Tr<'a> {
const C: PhantomData<&'a u8> = PhantomData::<&'a u8>;
}
fn main() {}
ICEs on nightly (1.12), can't be reproduced on stable/beta due to #![feature(associated_consts)]
Backtrace:
#0 0x000000006e55e767 in rust_panic () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/std-f53fb285.dll
#1 0x000000006e544e3c in std::panicking::rust_panic_with_hook::h9a3925e37821d434 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/std-f53fb285.dll
#2 0x0000000002a05b8c in std::panicking::begin_panic::hdf32e6f0d48da313 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#3 0x0000000002a059c8 in rustc::session::opt_span_bug_fmt::_$u7b$$u7b$closure$u7d$$u7d$::hfbd05ef01f930389 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#4 0x0000000002a05798 in rustc::session::opt_span_bug_fmt::he49e515088fa8437 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#5 0x0000000002a05555 in rustc::session::span_bug_fmt::h40548a94744de842 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#6 0x0000000002b1d29e in _$LT$rustc..infer..combine..Generalizer$LT$$u27$cx$C$$u20$$u27$gcx$C$$u20$$u27$tcx$GT$$u20$as$u20$rustc..ty..fold..TypeFolder$LT$$u27$gcx$C$$u20$$u27$tcx$GT$$GT$::fold_ty::hf2fab54cf2614ed1 ()
from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#7 0x0000000002b15a36 in rustc::infer::combine::CombineFields::instantiate::hffd1f98ca5ab6d3b () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#8 0x0000000002af0be1 in _$LT$rustc..infer..equate..Equate$LT$$u27$a$C$$u20$$u27$gcx$C$$u20$$u27$tcx$GT$$u20$as$u20$rustc..ty..relate..TypeRelation$LT$$u27$a$C$$u20$$u27$gcx$C$$u20$$u27$tcx$GT$$GT$::tys::he042e4faca40a521 ()
from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#9 0x0000000002af4645 in rustc::ty::relate::relate_type_params::_$u7b$$u7b$closure$u7d$$u7d$::h27ac1d6284ceaedc () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#10 0x0000000002af435a in _$LT$collections..vec..Vec$LT$T$GT$$u20$as$u20$core..iter..traits..FromIterator$LT$T$GT$$GT$::from_iter::hd947b801a25609d2 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#11 0x0000000002af36bf in rustc::ty::relate::relate_substs::ha20cc22e09ccff78 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#12 0x0000000002af1e2b in rustc::ty::relate::relate_item_substs::hf669fec513c5c374 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#13 0x0000000002b1ebfe in rustc::ty::relate::super_relate_tys::h698b991f588f8d3b () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#14 0x0000000002af0d89 in _$LT$rustc..infer..equate..Equate$LT$$u27$a$C$$u20$$u27$gcx$C$$u20$$u27$tcx$GT$$u20$as$u20$rustc..ty..relate..TypeRelation$LT$$u27$a$C$$u20$$u27$gcx$C$$u20$$u27$tcx$GT$$GT$::tys::he042e4faca40a521 ()
from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#15 0x0000000002af4645 in rustc::ty::relate::relate_type_params::_$u7b$$u7b$closure$u7d$$u7d$::h27ac1d6284ceaedc () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#16 0x0000000002af435a in _$LT$collections..vec..Vec$LT$T$GT$$u20$as$u20$core..iter..traits..FromIterator$LT$T$GT$$GT$::from_iter::hd947b801a25609d2 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#17 0x0000000002af36bf in rustc::ty::relate::relate_substs::ha20cc22e09ccff78 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#18 0x0000000002af1e2b in rustc::ty::relate::relate_item_substs::hf669fec513c5c374 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#19 0x0000000002af1c72 in _$LT$rustc..ty..sty..TraitRef$LT$$u27$tcx$GT$$u20$as$u20$rustc..ty..relate..Relate$LT$$u27$tcx$GT$$GT$::relate::h986b72a0959563fb () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#20 0x0000000002af1484 in rustc::infer::InferCtxt::eq_trait_refs::h1a047bc0d7cb9287 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#21 0x0000000002cad67b in rustc::traits::select::SelectionContext::match_impl::hc59fa4b835fb8273 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#22 0x0000000002cacec9 in rustc::traits::select::SelectionContext::assemble_candidates_from_impls::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h477fb8af4d02a8d4 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#23 0x0000000002cace18 in rustc::traits::select::SelectionContext::probe::h9e68b3f3a4f27c3c () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#24 0x0000000002cacbf8 in rustc::ty::trait_def::TraitDef::for_each_relevant_impl::h48255f01a2713db2 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#25 0x0000000002ca7b6e in rustc::traits::select::SelectionContext::assemble_candidates::h5d6c8f4149f33306 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#26 0x0000000002c9b2b4 in rustc::traits::select::SelectionContext::candidate_from_obligation::h57e2e1988c8b0c1d () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#27 0x0000000002ca5efd in rustc::traits::select::SelectionContext::evaluate_stack::h41d9a289217f5274 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#28 0x0000000002ca53e8 in rustc::traits::select::SelectionContext::evaluate_predicate_recursively::hd3a46054b61ed569 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#29 0x0000000002c4e821 in rustc::traits::select::SelectionContext::evaluate_obligation_conservatively::h6ab08bc990db370f () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#30 0x0000000002b1113f in rustc::traits::type_known_to_meet_builtin_bound::haf67b98536009464 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#31 0x0000000002d0c751 in rustc::ty::util::_$LT$impl$u20$rustc..ty..TyS$LT$$u27$tcx$GT$$GT$::impls_bound::h07a139f8ccd4fd61 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#32 0x0000000002b10e4f in rustc::ty::util::_$LT$impl$u20$rustc..ty..TyS$LT$$u27$tcx$GT$$GT$::moves_by_default::h25b140bd780bb824 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#33 0x0000000002b10d96 in rustc::infer::InferCtxt::type_moves_by_default::hfe88106eb6250ac6 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#34 0x0000000002b9f9e5 in rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr::h4b2d785ca70f00ad () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc-f53fb285.dll
#35 0x00000000673c8d6b in rustc_passes::consts::CheckCrateVisitor::global_expr::h47f4b325bf42d285 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc_passes-f53fb285.dll
#36 0x00000000673d2976 in _$LT$rustc_passes..consts..CheckCrateVisitor$LT$$u27$a$C$$u20$$u27$tcx$GT$$u20$as$u20$rustc..hir..intravisit..Visitor$LT$$u27$v$GT$$GT$::visit_item::h0528b8b3ad96685d ()
from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc_passes-f53fb285.dll
#37 0x00000000673d4bff in rustc_passes::consts::check_crate::h17411c6a9c58041d () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc_passes-f53fb285.dll
#38 0x000000006ac97fdd in rustc_driver::driver::phase_3_run_analysis_passes::_$u7b$$u7b$closure$u7d$$u7d$::he1de538a7584312e () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc_driver-f53fb285.dll
#39 0x000000006ac95d7e in rustc::ty::context::TyCtxt::create_and_enter::he5466411552b055e () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc_driver-f53fb285.dll
#40 0x000000006ac5a76c in rustc_driver::driver::compile_input::h2d1b58b831f06a86 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc_driver-f53fb285.dll
#41 0x000000006ac4695d in rustc_driver::run_compiler::h833483649bdaa9c3 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc_driver-f53fb285.dll
#42 0x000000006ac438ca in std::panicking::try::call::hd16aacc09eeeaf9e () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc_driver-f53fb285.dll
#43 0x000000006e58f849 in __rust_maybe_catch_panic () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/std-f53fb285.dll
#44 0x000000006ac443c4 in _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hbf614b3f826456b6 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/rustc_driver-f53fb285.dll
#45 0x000000006e57d4da in std::sys::thread::Thread::new::thread_start::h150ac04d84605902 () from /home/we/rust/x86_64-pc-windows-gnu/stage1/bin/std-f53fb285.dll
#46 0x00007ffce27813d2 in KERNEL32!BaseThreadInitThunk () from /c/Windows/system32/KERNEL32.DLL
#47 0x00007ffce39554e4 in ntdll!RtlUserThreadStart () from /c/Windows/SYSTEM32/ntdll.dll
#48 0x0000000000000000 in ?? ()