{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/25071","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/25071/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/25071/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/25071/events","html_url":"https://github.com/rust-lang/rust/issues/25071","id":72800804,"number":25071,"title":"ICE: cannot relate bound region: ReStatic <= ReEarlyBound(173, TypeSpace, 0, 'a)","user":{"login":"Boboseb","id":4552841,"avatar_url":"https://avatars.githubusercontent.com/u/4552841?v=3","gravatar_id":"","url":"https://api.github.com/users/Boboseb","html_url":"https://github.com/Boboseb","followers_url":"https://api.github.com/users/Boboseb/followers","following_url":"https://api.github.com/users/Boboseb/following{/other_user}","gists_url":"https://api.github.com/users/Boboseb/gists{/gist_id}","starred_url":"https://api.github.com/users/Boboseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boboseb/subscriptions","organizations_url":"https://api.github.com/users/Boboseb/orgs","repos_url":"https://api.github.com/users/Boboseb/repos","events_url":"https://api.github.com/users/Boboseb/events{/privacy}","received_events_url":"https://api.github.com/users/Boboseb/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":2,"created_at":"2015-05-03T12:39:12Z","updated_at":"2015-05-20T22:17:00Z","closed_at":"2015-05-20T22:17:00Z","body":"I've encountered an internal compiler error when building this code:\r\n\r\n```rust\r\nuse std::iter::*;\r\n\r\npub struct Ilbm<'a> {\r\n    body_data: &'a[u8],\r\n    data_width: u16,\r\n    depth: u8,\r\n    mask: u8,\r\n    ham: bool,\r\n}\r\n\r\nimpl<'a> Ilbm<'a> {\r\n\r\n    fn get_bit(buffer: &[u8], col: usize) -> u8 {\r\n        let byte_offset = col / 8;\r\n        let bit_offset = 7 - col % 8;\r\n        let byte_val = buffer[byte_offset];\r\n        (byte_val >> bit_offset) & 1\r\n    }\r\n\r\n    fn draw_row<'b>(&self, decoded_row_planes: Vec<&'b [u8]>) -> Box<Iterator<Item=u8> + 'b> {\r\n        let masking = self.mask == 1;\r\n\r\n        let ham_mask: u8 = if self.ham { if self.depth == 6 { 0x0F } else { 0x3F } } else { 0 };\r\n        let ham_shif: u8 = if self.ham { self.depth - 2 } else { 0 };\r\n        let depth = self.depth as usize;\r\n\r\n        Box::new((0..self.data_width)\r\n                 .flat_map(move |col| {\r\n                     if masking && Self::get_bit(decoded_row_planes[depth], col as usize) != 1 {\r\n                         repeat(0).take(4)\r\n                     }\r\n                     else {\r\n                        decoded_row_planes[depth][col as usize]\r\n                     }\r\n                 } ))\r\n    }\r\n\r\n}\r\n```\r\n\r\n## Meta\r\n\r\n`rustc --version --verbose`:\r\n```\r\nrustc 1.0.0-beta.3 (5241bf9c3 2015-04-25) (built 2015-04-25)\r\nbinary: rustc\r\ncommit-hash: 5241bf9c34d156ea6064367a33cbd7222eeb5789\r\ncommit-date: 2015-04-25\r\nbuild-date: 2015-04-25\r\nhost: x86_64-apple-darwin\r\nrelease: 1.0.0-beta.3\r\n```\r\n\r\nBacktrace:\r\n```\r\nthread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:149\r\n\r\nstack backtrace:\r\n   1:        0x10affc33f - sys::backtrace::write::h0f2fc53eb11eb814gWr\r\n   2:        0x10b004942 - panicking::on_panic::hd617a4042e8486fciUv\r\n   3:        0x10afc1375 - rt::unwind::begin_unwind_inner::hd84dfec22ac3667d1Bv\r\n   4:        0x10a7a09fe - rt::unwind::begin_unwind::h17792509132866387090\r\n   5:        0x10a7a098a - diagnostic::SpanHandler::span_bug::hebb6215f61f436aaEqB\r\n   6:        0x10867405b - middle::infer::region_inference::RegionVarBindings<'a, 'tcx>::make_subregion::h4adb78ad460601ecS8u\r\n   7:        0x10862aeab - middle::infer::sub::Sub<'a, 'tcx>.TypeRelation<'a, 'tcx>::regions::h3f9ee82a2e72a144Mjx\r\n   8:        0x10862ac91 - middle::infer::sub::Sub<'a, 'tcx>.TypeRelation<'a, 'tcx>::relate_with_variance::h5672739467683317342\r\n   9:        0x10862a20b - middle::ty_relate::relate_substs::h2389761154872115822\r\n  10:        0x1086297fa - middle::ty_relate::relate_item_substs::h7360249961707336134\r\n  11:        0x10868b447 - middle::ty_relate::super_relate_tys::h10795509169925483940\r\n  12:        0x108621bb2 - middle::infer::sub::Sub<'a, 'tcx>.TypeRelation<'a, 'tcx>::tys::h3174a850422a5fc1pfx\r\n  13:        0x10868ff47 - middle::infer::InferCtxt<'a, 'tcx>::sub_types::hea49ed0ad06eecf898y\r\n  14:        0x107ccd1d5 - check::method::probe::ProbeContext<'a, 'tcx>::consider_candidates::h2b54d2790fd0880dXoi\r\n  15:        0x107cccf79 - check::method::probe::ProbeContext<'a, 'tcx>::pick_method::hc768ec9b0fb6e87dUki\r\n  16:        0x107ccc346 - check::method::probe::ProbeContext<'a, 'tcx>::pick_core::h3e5895ad5629b90bOfi\r\n  17:        0x107cc1cbc - check::method::probe::probe::closure.31574\r\n  18:        0x107cbf389 - check::method::probe::probe::hfbf147788d37ee49T4g\r\n  19:        0x107cd9ecd - check::method::resolve_ufcs::h9a77d5ebe946bd48d7j\r\n  20:        0x107d65c30 - check::check_expr_with_unifier::h1091590169474595220\r\n  21:        0x107cfaf2c - check::callee::check_call::hf304e98e66e2eee3Nhm\r\n  22:        0x107d61b0a - check::check_expr_with_unifier::h1091590169474595220\r\n  23:        0x107d0a18d - check::op::check_binop::h6504e0630336d4baFan\r\n  24:        0x107d498ae - check::check_expr_with_unifier::h4364205555285070129\r\n  25:        0x107d0a42e - check::op::check_binop::h6504e0630336d4baFan\r\n  26:        0x107d4343b - check::check_expr_with_unifier::h8963715346170232283\r\n  27:        0x107d2f66d - check::check_expr_with_unifier::check_then_else::h1d5d0ab6867397defIq\r\n  28:        0x107d49b8d - check::check_expr_with_unifier::h4364205555285070129\r\n  29:        0x107d191db - check::check_block_with_expected::h83c5e18f3456d9895hs\r\n  30:        0x107d49d85 - check::check_expr_with_unifier::h4364205555285070129\r\n  31:        0x107d191db - check::check_block_with_expected::h83c5e18f3456d9895hs\r\n  32:        0x107cfa508 - check::check_fn::h5c814037ea8a2362C4n\r\n  33:        0x107cf8966 - check::closure::check_expr_closure::h0b5d1648c0a7d5409Pl\r\n  34:        0x107d25f08 - check::check_expr_with_unifier::h8674341778859500334\r\n  35:        0x107d00d9c - check::check_argument_types::hbd54866e0651a010O5p\r\n  36:        0x107d0208a - check::check_method_argument_types::h42f31152b61f4a11d3p\r\n  37:        0x107d308cc - check::check_expr_with_unifier::check_method_call::h6fc40daeec19d10dlFq\r\n  38:        0x107d2595e - check::check_expr_with_unifier::h8674341778859500334\r\n  39:        0x107d00d9c - check::check_argument_types::hbd54866e0651a010O5p\r\n  40:        0x107cfe0be - check::callee::confirm_builtin_call::h98216b80db4bfd2f5qm\r\n  41:        0x107cfc849 - check::callee::check_call::hf304e98e66e2eee3Nhm\r\n  42:        0x107d49701 - check::check_expr_with_unifier::h4364205555285070129\r\n  43:        0x107d191db - check::check_block_with_expected::h83c5e18f3456d9895hs\r\n  44:        0x107cfa508 - check::check_fn::h5c814037ea8a2362C4n\r\n  45:        0x107d14599 - check::check_bare_fn::hd839ee74cb29d084bUn\r\n  46:        0x107d1d4c7 - check::check_method_body::hf8957dc76229cbd6Gvo\r\n  47:        0x107d124db - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hc008350ec16b94ffeRn\r\n  48:        0x107ddbeda - check_crate::closure.38340\r\n  49:        0x107dd72e7 - check_crate::h7f9bbce56981d322gCC\r\n  50:        0x107b3c2d2 - driver::phase_3_run_analysis_passes::hb862dc042470f6e0nGa\r\n  51:        0x107b1e09c - driver::compile_input::h4747d8bb1c595fdfQba\r\n  52:        0x107be58f3 - run_compiler::hc8c95c5858347fdbz4b\r\n  53:        0x107be341a - boxed::F.FnBox<A>::call_box::h7872786064439979928\r\n  54:        0x107be28b7 - rt::unwind::try::try_fn::h10239991317224243769\r\n  55:        0x10b0857c8 - rust_try_inner\r\n  56:        0x10b0857b5 - rust_try\r\n  57:        0x107be2b90 - boxed::F.FnBox<A>::call_box::h4543691575426869824\r\n  58:        0x10b00348d - sys::thread::create::thread_start::h499b3be451a7bbb8AZu\r\n  59:     0x7fff91f30267 - _pthread_body\r\n  60:     0x7fff91f301e4 - _pthread_start\r\n```"}}