Issue 1:
ICE (panic) when compiling following code, adding lifetime to ValuesIter (as in commented line) fixes the crash

trait Data {
fn values_iter(&self) -> Values;
}

struct Values<'a> {
iter: Box<Iterator<Item=&'a Data>>
}

type ValuesIter<'a> = Box<Iterator<Item=&'a Data>>;

impl <'a> Values<'a> {
// fn use_iter(consume_iter: ValuesIter<'a>) -> Values { // non cashing version
fn use_iter(consume_iter: ValuesIter) -> Values {
Values {
iter: consume_iter
}
}
}

fn main() {

}

meta

rustc --version --verbose
rustc 1.0.0-nightly (b47aebe3f 2015-02-26) (built 2015-02-26)
binary: rustc
commit-hash: b47aebe3fc2da06c760fd8ea19f84cbc41d34831
commit-date: 2015-02-26
build-date: 2015-02-26
host: x86_64-apple-darwin
release: 1.0.0-nightly

Backtrace

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 'assertion failed: !self.has_escaping_regions()', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/librustc/middle/ty.rs:1964

stack backtrace:
1: 0x849d0f3 - sys::backtrace::write::h0c33dfca8f99823a7hA
2: 0x84ca075 - panicking::on_panic::h63c237d7347b7375J0I
3: 0x83f3888 - rt::unwind::begin_unwind_inner::h6bff9e2dc073eba1FJI
4: 0x5184995 - rt::unwind::begin_unwind::h5603377685902845039
5: 0x553bff0 - middle::traits::util::predicate_for_trait_ref::hc8b0e37ad45b6f00foT
6: 0x54f4e9e - middle::traits::util::predicate_for_builtin_bound::h062017d79fea07a3ppT
7: 0x537bd92 - middle::traits::fulfill::FulfillmentContext<'tcx>::register_builtin_bound::hfa096c6e6360d4a1sJN
8: 0x4cf17a0 - check::FnCtxt<'a, 'tcx>::register_builtin_bound::h65b7bd738a5caf6cOJo
9: 0x4d927c5 - check::check_fn::hcd6c5b82200e8b638kn
10: 0x4dadbe1 - check::check_bare_fn::h15cf7ff47fb8abd6Oan
11: 0x4db1984 - check::check_method_body::h2c61d934ba5574ddnIn
12: 0x4da7305 - check::check_item::hdf505d0347935dc1stn
13: 0x4e76fc3 - check_crate::closure.36015
14: 0x4e72351 - check_crate::hcb2bf169ea38b50bEXB
15: 0x47f58fb - driver::phase_3_run_analysis_passes::ha7dff75b48821bd6wFa
16: 0x47daf31 - driver::compile_input::hae2a48b9668b0aa2Hba
17: 0x48af037 - run_compiler::h299009668b50e3c8E5b
18: 0x48ac4b1 - thunk::F.Invoke<A, R>::invoke::h1418038354819973823
19: 0x48ab110 - rt::unwind::try::try_fn::h5455690823431792689
20: 0x8542e29 - rust_try_inner
21: 0x8542e16 - rust_try
22: 0x48ab875 - thunk::F.Invoke<A, R>::invoke::h5089518861878639055
23: 0x84b3453 - sys::thread::thread_start::h15d3d9d95ad88a69NDE
24: 0x917db268 - _pthread_body
25: 0x917db1e5 - _pthread_body

Issue 2:
Compiler panic. Found an ealier issue in the same file that had been closed because the problem had gone away in later compiles. This is the stable 1.1 though.

Version info

rustc 1.1.0 (35ceea3 2015-06-19)

binary: rustc

commit-hash: 35ceea3

commit-date: 2015-06-19

host: x86_64-pc-windows-gnu

release: 1.1.0

RUST_BACKTRACE=1 rustc --verbose src/main.rs

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 'assertion failed: !self.has_escaping_regions()', C:/bot/slave/stable-dist-rustc-win-gnu-64/build/src/librustc\middle\ty.rs:2123

stack backtrace:

1: 0x6f138a02 - sys::backtrace::write::hb142593d131303b10fs

2: 0x6f141e76 - rt::unwind::register::h2f2891f465b0e536sNv

3: 0x6f1053c0 - rt::unwind::begin_unwind_inner::he5d025d7f655ecaaCKv

4: 0x6d08989e - middle::astencode::rbml..Doc<'a>.doc_decoder_helpers::opt_child::hd6aba4d7b00f0fc9UKb

5: 0x6d1c0773 - middle::traits::fulfill::FulfillmentContext<'tcx>::register_builtin_bound::h1fba927ecfad50a9DEO

6: 0x6a93c978 - check::FnCtxt<'a, 'tcx>.mc..Typer<'tcx>::is_method_call::hb206e83d494db5a0Akn

7: 0x6a948ac8 - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::he778b71de0699925wAo

8: 0x6a95effc - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h49b5aaa3aec9c80dWrn

9: 0x6a95d1df - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h49b5aaa3aec9c80dWrn

10: 0x6aa187ab - check_crate::hf98f1f239eb0b1afsJC

11: 0x6aa11f75 - check_crate::hf98f1f239eb0b1afsJC

12: 0x6701f3dd - driver::phase_3_run_analysis_passes::h5d9dbc988e0fcdbatGa

13: 0x67002b40 - driver::compile_input::h66ba80b489f2ef28Qba

14: 0x670b5913 - run_compiler::hf1308c7d75cfa1a775b

15: 0x670b349f - run::h99d8d2bce2d42189N5b

16: 0x670b2a59 - run::h99d8d2bce2d42189N5b

17: 0x6f17b5bc - rust_try

18: 0x6f17b599 - rust_try

19: 0x670b2cd5 - run::h99d8d2bce2d42189N5b

20: 0x6f140134 - sys::process::Command::cwd::hecbd2393e1ca7c52luu

21: 0x776659cd - BaseThreadInitThunk