{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/23111","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/23111/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/23111/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/23111/events","html_url":"https://github.com/rust-lang/rust/issues/23111","id":60090831,"number":23111,"title":"ICE when missing lifetime anotation on following code","user":{"login":"nicolas-cherel","id":208296,"avatar_url":"https://avatars.githubusercontent.com/u/208296?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-cherel","html_url":"https://github.com/nicolas-cherel","followers_url":"https://api.github.com/users/nicolas-cherel/followers","following_url":"https://api.github.com/users/nicolas-cherel/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-cherel/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-cherel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-cherel/subscriptions","organizations_url":"https://api.github.com/users/nicolas-cherel/orgs","repos_url":"https://api.github.com/users/nicolas-cherel/repos","events_url":"https://api.github.com/users/nicolas-cherel/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-cherel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-ICE","name":"I-ICE","color":"e10c02"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-06T11:30:53Z","updated_at":"2015-06-29T18:09:21Z","closed_at":"2015-06-29T18:09:21Z","body":"ICE (panic) when compiling following code, adding lifetime to ValuesIter (as in commented line) fixes the crash\r\n\r\n```rust\r\ntrait Data {\r\n  fn values_iter(&self) -> Values;\r\n}\r\n\r\n\r\nstruct Values<'a> {\r\n  iter: Box<Iterator<Item=&'a Data>>\r\n}\r\n\r\ntype ValuesIter<'a> = Box<Iterator<Item=&'a Data>>;\r\n\r\nimpl <'a> Values<'a> {\r\n  // fn use_iter(consume_iter: ValuesIter<'a>) -> Values {  // non cashing version\r\n  fn use_iter(consume_iter: ValuesIter) -> Values {\r\n    Values {\r\n      iter: consume_iter\r\n    }\r\n  }\r\n}\r\n\r\n\r\n\r\nfn main() {\r\n\r\n}\r\n```\r\n\r\n## meta\r\n\r\n```\r\nrustc --version --verbose\r\nrustc 1.0.0-nightly (b47aebe3f 2015-02-26) (built 2015-02-26)\r\nbinary: rustc\r\ncommit-hash: b47aebe3fc2da06c760fd8ea19f84cbc41d34831\r\ncommit-date: 2015-02-26\r\nbuild-date: 2015-02-26\r\nhost: x86_64-apple-darwin\r\nrelease: 1.0.0-nightly\r\n```\r\n\r\nBacktrace\r\n\r\n```\r\nerror: internal compiler error: unexpected panic\r\nnote: the compiler unexpectedly panicked. this is a bug.\r\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports\r\nnote: run with `RUST_BACKTRACE=1` for a backtrace\r\nthread '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\r\n\r\nstack backtrace:\r\n   1:          0x849d0f3 - sys::backtrace::write::h0c33dfca8f99823a7hA\r\n   2:          0x84ca075 - panicking::on_panic::h63c237d7347b7375J0I\r\n   3:          0x83f3888 - rt::unwind::begin_unwind_inner::h6bff9e2dc073eba1FJI\r\n   4:          0x5184995 - rt::unwind::begin_unwind::h5603377685902845039\r\n   5:          0x553bff0 - middle::traits::util::predicate_for_trait_ref::hc8b0e37ad45b6f00foT\r\n   6:          0x54f4e9e - middle::traits::util::predicate_for_builtin_bound::h062017d79fea07a3ppT\r\n   7:          0x537bd92 - middle::traits::fulfill::FulfillmentContext<'tcx>::register_builtin_bound::hfa096c6e6360d4a1sJN\r\n   8:          0x4cf17a0 - check::FnCtxt<'a, 'tcx>::register_builtin_bound::h65b7bd738a5caf6cOJo\r\n   9:          0x4d927c5 - check::check_fn::hcd6c5b82200e8b638kn\r\n  10:          0x4dadbe1 - check::check_bare_fn::h15cf7ff47fb8abd6Oan\r\n  11:          0x4db1984 - check::check_method_body::h2c61d934ba5574ddnIn\r\n  12:          0x4da7305 - check::check_item::hdf505d0347935dc1stn\r\n  13:          0x4e76fc3 - check_crate::closure.36015\r\n  14:          0x4e72351 - check_crate::hcb2bf169ea38b50bEXB\r\n  15:          0x47f58fb - driver::phase_3_run_analysis_passes::ha7dff75b48821bd6wFa\r\n  16:          0x47daf31 - driver::compile_input::hae2a48b9668b0aa2Hba\r\n  17:          0x48af037 - run_compiler::h299009668b50e3c8E5b\r\n  18:          0x48ac4b1 - thunk::F.Invoke<A, R>::invoke::h1418038354819973823\r\n  19:          0x48ab110 - rt::unwind::try::try_fn::h5455690823431792689\r\n  20:          0x8542e29 - rust_try_inner\r\n  21:          0x8542e16 - rust_try\r\n  22:          0x48ab875 - thunk::F.Invoke<A, R>::invoke::h5089518861878639055\r\n  23:          0x84b3453 - sys::thread::thread_start::h15d3d9d95ad88a69NDE\r\n  24:         0x917db268 - _pthread_body\r\n  25:         0x917db1e5 - _pthread_body\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/116780233","html_url":"https://github.com/rust-lang/rust/issues/23111#issuecomment-116780233","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/23111","id":116780233,"user":{"login":"arielb1","id":1830974,"avatar_url":"https://avatars.githubusercontent.com/u/1830974?v=3","gravatar_id":"","url":"https://api.github.com/users/arielb1","html_url":"https://github.com/arielb1","followers_url":"https://api.github.com/users/arielb1/followers","following_url":"https://api.github.com/users/arielb1/following{/other_user}","gists_url":"https://api.github.com/users/arielb1/gists{/gist_id}","starred_url":"https://api.github.com/users/arielb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arielb1/subscriptions","organizations_url":"https://api.github.com/users/arielb1/orgs","repos_url":"https://api.github.com/users/arielb1/repos","events_url":"https://api.github.com/users/arielb1/events{/privacy}","received_events_url":"https://api.github.com/users/arielb1/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T18:09:21Z","updated_at":"2015-06-29T18:09:21Z","body":"Duplicate of #26638."}}