Issue 1:
rustc 1.0.0-dev (3614e1de6 2015-01-14 04:42:01 +0000)

pub trait Trait where Self::Out: std::fmt::Show {
type Out;
}

thread 'rustc' panicked at 'no entry found for key', /home/tom/src/rust/rust/src/libcore/option.rs:330

stack backtrace:
1: 0x7f4c3e42ca80 - sys::backtrace::write::ha0aae27c13f1e1e2wRt
2: 0x7f4c3e44e460 - failure::on_fail::h6467179db076ae40d5z
3: 0x7f4c3e3bd510 - rt::unwind::begin_unwind_inner::h60ee3cb21c325c186Jz
4: 0x7f4c3e3be040 - rt::unwind::begin_unwind_fmt::h374483fb441173d8DIz
5: 0x7f4c3e44e2c0 - rust_begin_unwind
6: 0x7f4c3e49fb80 - panicking::panic_fmt::h61e6123d33617eebvym
7: 0x7f4c3dc60570 - astconv::ast_ty_to_ty::unboxed_closure.29412
8: 0x7f4c3dc12b10 - astconv::ast_ty_to_ty::h1763fcd7e8e2744azSs
9: 0x7f4c3dc8c960 - collect::ty_generics::he250f27d9578b0d23Vu
10: 0x7f4c3dc73ac0 - collect::trait_def_of_item::h6774115495711e070wu
11: 0x7f4c3dc71690 - collect::CollectTraitDefVisitor<'a, 'tcx>.visit..Visitor<'v>::visit_item::he26bc84d696b35decKt
12: 0x7f4c3dcbc0b0 - check_crate::unboxed_closure.30645
13: 0x7f4c3dcba0f0 - check_crate::h022f16fd72b6c09dney
14: 0x7f4c3e986c70 - driver::phase_3_run_analysis_passes::h0ee4fa5e73acbe9cEEa
15: 0x7f4c3e974a50 - driver::compile_input::hc689346ac2e9c62fAba
16: 0x7f4c3ea36310 - run_compiler::he89321e2dd531b37e5b
17: 0x7f4c3ea34a80 - thunk::F.Invoke<A, R>::invoke::h16839135703482139551
18: 0x7f4c3ea339e0 - rt::unwind::try::try_fn::h363853857083200694
19: 0x7f4c3e4be130 - rust_try_inner
20: 0x7f4c3e4be120 - rust_try
21: 0x7f4c3ea33c90 - thunk::F.Invoke<A, R>::invoke::h16782837970792084443
22: 0x7f4c3e43c100 - sys::thread::thread_start::h5480a52fb17d8858jJw
23: 0x7f4c38b73250 - start_thread
24: 0x7f4c3e06d219 - clone
25: 0x0 - <unknown>

Thought this might be a dupe of #20220 #20772 but I don't think so.

Issue 2:
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:362

I tried this code:

#![feature(iter_arith)]

fn main() {
println!("avg1 = {}", avg::<isize>( (1..11) ));
println!("avg1 = {}", avg::<isize>( (1..11).filter(|&x| x % 2 == 0) ));
}

fn avg<S, T=T::Item>(x: T) -> f64
where T: IntoIterator<Item=isize> {

let it = x.into_iter();
match it.size_hint() {
(lower, Some(upper)) if lower == upper => {
println!("exact len");
it.sum::<S>() as f64 / lower as f64
}
_ => {
let mut sum = 0;
let mut count = 0;

for i in it {
sum = sum + i;
count += 1;
}

sum as f64 / count as f64
}
}
}

I expected to see this happen: code should compile or the compiler should report an error.

Instead, this happened: the compiler panicked.

Meta

rustc --version --verbose:

rustc 1.3.0-nightly (cb7d06215 2015-06-26)
binary: rustc
commit-hash: cb7d0621556fabcdcc36d0da279305ad285ec662
commit-date: 2015-06-26
host: x86_64-pc-windows-gnu
release: 1.3.0-nightly

Backtrace:

1: 0x61df90f5 - sys::backtrace::write::h025f886ce4157216LAs
2: 0x61e0289c - rt::unwind::register::h5ad63c24fb31bf08qfw
3: 0x61dc561f - rt::unwind::begin_unwind_inner::hfc1332db90d09e50zcw
4: 0x61dc5f9a - rt::unwind::begin_unwind_fmt::ha3ff9e0dc1fa5705Fbw
5: 0x61e022b3 - rust_begin_unwind
6: 0x61e1ead9 - panicking::panic_fmt::h9bd2cfb05a12923fH8B
7: 0x61e19121 - panicking::panic::hacb4eddea015f0f3e7B
8: 0x62ded9de - middle::ty::ctxt<'tcx>::type_parameter_def::hda01cc044215acd1rU6
9: 0xc32659 - check::TupleArgumentsFlag...std..clone..Clone::clone::h1be2a27edcea5bafSDq
10: 0xbf2459 - check::FnCtxt<'a, 'tcx>::require_type_meets::h64f5de27ee30a606zjp
11: 0xc714a9 - collect::ast..Generics.GetTypeParameterBounds<'tcx>::get_type_parameter_bounds::h08e9b997e941d802Oxx
12: 0xc6e276 - collect::ast..Generics.GetTypeParameterBounds<'tcx>::get_type_parameter_bounds::h08e9b997e941d802Oxx
13: 0xc6519d - collect::ast..Generics.GetTypeParameterBounds<'tcx>::get_type_parameter_bounds::h08e9b997e941d802Oxx
14: 0xc4d100 - collect::AstConvRequest...std..clone..Clone::clone::hcbd1e5932dbd5c05o7w
15: 0xc4a0a7 - collect::collect_item_types::h832ec93e81779425R0w
16: 0xc98b72 - check_crate::hc0757b7883cfbf0b08C
17: 0x71068b49 - driver::assign_node_ids_and_map::h19857398bfcdab684Da
18: 0x71066f94 - driver::assign_node_ids_and_map::h19857398bfcdab684Da
19: 0x71061489 - driver::assign_node_ids_and_map::h19857398bfcdab684Da
20: 0x71042a66 - driver::compile_input::h4f87ae57d3ecc9bdTba
21: 0x7112483d - run_compiler::h2ed758d21912ca6fx7b
22: 0x711224c5 - run::h53e8d74dd390297dd7b
23: 0x71121e09 - run::h53e8d74dd390297dd7b
24: 0x61e3d54c - rust_try
25: 0x61e3d529 - rust_try
26: 0x61ded4c5 - rt::unwind::try::inner_try::hbdd1fe1d49ddad43s8v
27: 0x71121fc7 - run::h53e8d74dd390297dd7b
28: 0x61e003f4 - sys::process::Command::cwd::h4194821e987e71efwUu
29: 0x7ffa49102ef2 - BaseThreadInitThunk