Closed
Description
Found this ICE while trying to convert the S
in Hasher<S>
into an associated type. (FWIW, I also hit #18611 in the process)
STR
#![feature(associated_types)]
pub trait Hasher{
type State;
fn hash<T: Hash< <Self as Hasher>::State>>(&self, value: &T) -> u64;
}
trait Hash<S> {
fn hash(&self, state: &mut S);
}
Output
task 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0', /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/librustc/middle/subst.rs:388
stack backtrace:
1: 0x7f702c7a9560 - rt::backtrace::imp::write::h2fa8e210cbdd14ecdUs
2: 0x7f702c7ac5f0 - <unknown>
3: 0x7f702cf5b320 - unwind::begin_unwind_inner::h2bf101b14ceccda8Pad
4: 0x7f702cf5afa0 - unwind::begin_unwind_fmt::hc4fd72ddd00fb220h8c
5: 0x7f702cf5af60 - rust_begin_unwind
6: 0x7f702cf978b0 - panicking::panic_fmt::he52a5729773324b60Nl
7: 0x7f702cf9cca0 - panicking::panic_bounds_check::h71560967a4c6e019yMl
8: 0x7f702bb315a0 - middle::typeck::collect::is_associated_type_valid_for_param::h82471e75169a62c6R7D
9: 0x7f702bb40370 - <unknown>
10: 0x7f702bb23ea0 - <unknown>
11: 0x7f702b910790 - <unknown>
12: 0x7f702bb22670 - <unknown>
13: 0x7f702bb221d0 - <unknown>
14: 0x7f702bb220d0 - <unknown>
15: 0x7f702bb21f20 - <unknown>
16: 0x7f702bb1e750 - <unknown>
17: 0x7f702baf86d0 - middle::typeck::collect::convert::hb88dec01b4ea2521NwE
18: 0x7f702baf1f60 - middle::typeck::collect::collect_item_types::hcb8bf5c174f5a33bTvD
19: 0x7f702bd08a50 - <unknown>
20: 0x7f702bd07bc0 - middle::typeck::check_crate::ha3047a37f1357500XhJ
21: 0x7f702d4420c0 - driver::driver::phase_3_run_analysis_passes::h4b7343c1d32e3d38RLR
22: 0x7f702d436ee0 - driver::driver::compile_input::h5f97124b77daf0b6BsR
23: 0x7f702d4b7a30 - <unknown>
24: 0x7f702d4b7920 - <unknown>
25: 0x7f702d2da520 - <unknown>
26: 0x7f702d2da310 - <unknown>
27: 0x7f702d7d9b90 - <unknown>
28: 0x7f702cfaa680 - <unknown>
29: 0x7f702cfaa670 - rust_try
30: 0x7f702cf58c80 - unwind::try::h00b99ef8aa34ae99rZc
31: 0x7f702cf58b10 - task::Task::run::h5f5b9665aeb0e846h5b
32: 0x7f702d7d98d0 - <unknown>
33: 0x7f702cf5a330 - <unknown>
34: 0x7f7027b521d0 - start_thread
35: 0x7f702cc311b9 - clone
36: 0x0 - <unknown>
Version
rustc 0.13.0-dev (618bd5d1c 2014-11-18 15:26:43 +0000)