Issue 1:
The following code currently produces an ICE:

fn main() {
let bytes = [1u8, 2, 3, 4, 5, 6, 7, 8];

for [a, b, c, d] in bytes.chunks(4) {
println!("{} {} {} {}", a, b, c, d);
}
}

<anon>:4:9: 4:21 error: internal compiler error: Explicit index of non-index type `core::slice::Chunks<'_,u8>`
<anon>:4 for [a, b, c, d] in bytes.chunks(4) {
^~~~~~~~~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:113

This should clearly produce a compile time error of course, but not an ICE.

Issue 2:
The following code

struct Wrapper<'a> {
slice: &'a [u8]
}

fn main() {
let foo = Some(b"Hello World!");
let bar: Option<Wrapper<'static>> = foo.map(|&x| Wrapper { slice: x });

}

triggers a compiler bug:

$ RUST_BACKTRACE=1 rustc test.rs
test.rs:7:71: 7:72 error: internal compiler error: Explicit index of non-index type `[u8]`
test.rs:7 let bar: Option<Wrapper<'static>> = foo.map(|&x| Wrapper { slice: x });
^
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:107

stack backtrace:
1: 0x10753a635 - rt::backtrace::imp::write::hbede6c694eb9f2cbIQp::v0.11.0.pre
2: 0x107540bd7 - failure::on_fail::h30a7f46ec21fe35516p::v0.11.0.pre
3: 0x1077eb249 - unwind::begin_unwind_inner::h6c751dc42f0f7f17IVd::v0.11.0.pre
4: 0x106c51e25 - unwind::begin_unwind::h16840659320017284217::v0.11.0.pre
5: 0x106c51dad - diagnostic::SpanHandler::span_bug::hb5a406cf5dd1450cWac::v0.11.0.pre
6: 0x1045047e5 - driver::session::Session::span_bug::hc60df83bd7dbe984Trr::v0.11.0.pre
7: 0x10478c506 - middle::mem_categorization::MemCategorizationContext<'t, TYPER>::cat_index::h11027325414672250850::v0.11.0.pre
8: 0x10476be2b - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre
9: 0x104770542 - visit::walk_expr::h7092108895728945809::v0.11.0.pre
10: 0x10476b2a0 - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre
11: 0x10476cf8e - visit::walk_block::h6655035168579021138::v0.11.0.pre
12: 0x104770936 - visit::walk_fn::h7111590603532843168::v0.11.0.pre
13: 0x10476b865 - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre
14: 0x104770113 - visit::walk_expr::h7092108895728945809::v0.11.0.pre
15: 0x10476b2a0 - middle::typeck::check::regionck::visit_expr::h8ad96e881d8c059afH8::v0.11.0.pre
16: 0x10476ce12 - middle::typeck::check::regionck::visit_local::ha0697ea4d5b15fbeUD8::v0.11.0.pre
17: 0x10476cf6a - visit::walk_block::h6655035168579021138::v0.11.0.pre
18: 0x1047afc0e - middle::typeck::check::check_bare_fn::hcd02e3ea22711cdcA2c::v0.11.0.pre
19: 0x1047a98ce - middle::typeck::check::check_item::h066c89136b0abe5fOzd::v0.11.0.pre
20: 0x1047af98d - middle::typeck::check::check_item_types::ha45c368daeab74efS1c::v0.11.0.pre
21: 0x10492161e - middle::typeck::check_crate::hae37e3b7b5c6e1b3Q3C::v0.11.0.pre
22: 0x104d75878 - driver::driver::phase_3_run_analysis_passes::hfbfa07100b0674bdFrq::v0.11.0.pre
23: 0x104d708c5 - driver::driver::compile_input::hf1aa489ba45a9efcDeq::v0.11.0.pre
24: 0x104e3709b - driver::run_compiler::h9c79a8fc68073767b0s::v0.11.0.pre
25: 0x104e348b6 - driver::main_args::closure.117540
26: 0x104e48f8b - task::TaskBuilder<S>::try_future::closure.118681
27: 0x104e48e24 - task::TaskBuilder<S>::spawn_internal::closure.118658
28: 0x10444395c - task::spawn_opts::closure.7563
29: 0x107850dac - rust_try
30: 0x1077e76ea - unwind::try::h7f3fc3b0329b49ea7Jd::v0.11.0.pre
31: 0x1077e73ec - task::Task::run::h4a0e5408354628dfZVc::v0.11.0.pre
32: 0x1044437eb - task::spawn_opts::closure.7508
33: 0x1077e9f59 - thread::thread_start::h5aa600706e7c5c88xid::v0.11.0.pre
34: 0x7fff973fd899 - _pthread_body
35: 0x7fff973fd72a - _pthread_struct_init