{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/36381","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/36381/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/36381/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/36381/events","html_url":"https://github.com/rust-lang/rust/issues/36381","id":176184086,"number":36381,"title":"ICE: 'rustc' panicked at 'assertion failed: concrete_substs.is_normalized_for_trans()'","user":{"login":"Marwes","id":957312,"avatar_url":"https://avatars.githubusercontent.com/u/957312?v=3","gravatar_id":"","url":"https://api.github.com/users/Marwes","html_url":"https://github.com/Marwes","followers_url":"https://api.github.com/users/Marwes/followers","following_url":"https://api.github.com/users/Marwes/following{/other_user}","gists_url":"https://api.github.com/users/Marwes/gists{/gist_id}","starred_url":"https://api.github.com/users/Marwes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marwes/subscriptions","organizations_url":"https://api.github.com/users/Marwes/orgs","repos_url":"https://api.github.com/users/Marwes/repos","events_url":"https://api.github.com/users/Marwes/events{/privacy}","received_events_url":"https://api.github.com/users/Marwes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-10T15:04:48Z","updated_at":"2016-09-11T07:50:01Z","closed_at":null,"body":"The ICE goes away if `&str` is changed to `()` so it might have something to do with lifetimes.\r\n\r\n```rust\r\npub trait StreamOnce {\r\n    type Position;\r\n}\r\n\r\nimpl<'a> StreamOnce for &'a str {\r\n    type Position = usize;\r\n}\r\n\r\npub fn parser<F>(_: F) {\r\n    panic!()\r\n}\r\n\r\nfn follow(_: &str) -> <&str as StreamOnce>::Position {\r\n    panic!()\r\n}\r\n\r\nfn main() {\r\n    parser(follow);\r\n}\r\n```\r\n```\r\nthread 'rustc' panicked at 'assertion failed: concrete_substs.is_normalized_for_trans()', ../src/librustc_trans\\collector.rs:1038\r\nstack backtrace:\r\n   0:     0x7ff943c76fda - <std::rand::OsRng as rand::Rng>::fill_bytes::h076068e3d5c70638\r\n   1:     0x7ff943c74d40 - std::panicking::Location::line::h1d71b2da86bcc037\r\n   2:     0x7ff943c757cd - std::panicking::rust_panic_with_hook::hb1322e5f2588b4db\r\n   3:     0x7ff943057be3 - <unknown>\r\n   4:     0x7ff94310ac65 - <rustc_trans::collector::MirNeighborCollector<'a, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_terminator_kind::h6eab751b04fbd7ab\r\n   5:     0x7ff943109f08 - <rustc_trans::collector::MirNeighborCollector<'a, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_operand::h33e5e243ea282334\r\n   6:     0x7ff94310a4fb - <rustc_trans::collector::MirNeighborCollector<'a, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_terminator_kind::h6eab751b04fbd7ab\r\n   7:     0x7ff94307927b - <unknown>\r\n   8:     0x7ff943106ef3 - <rustc_trans::collector::TransItemCollectionMode as core::fmt::Debug>::fmt::h6c44aead55c9bfdb\r\n   9:     0x7ff94318ec35 - <rustc_trans::ModuleSource as core::clone::Clone>::clone::h3d702b4981d13b3c\r\n  10:     0x7ff9430e85a8 - rustc_trans::base::trans_crate::hf067cf9d0a8bcbf2\r\n  11:     0x7ff9430e1847 - rustc_trans::base::trans_crate::hf067cf9d0a8bcbf2\r\n  12:     0x7ff94422e7ba - rustc_driver::driver::phase_4_translate_to_llvm::he9d5d0022988d46e\r\n  13:     0x7ff94427f893 - rustc_driver::main::h5a1049f207c7c577\r\n  14:     0x7ff9442616d6 - rustc_driver::main::h5a1049f207c7c577\r\n  15:     0x7ff94419e5c2 - <unknown>\r\n  16:     0x7ff94421db6a - rustc_driver::driver::compile_input::h7dacd98cd2fd7d2b\r\n  17:     0x7ff94424b789 - rustc_driver::run_compiler::h37c4294ab73436f7\r\n  18:     0x7ff94416b051 - <unknown>\r\n  19:     0x7ff943c7fa31 - _rust_maybe_catch_panic\r\n  20:     0x7ff9441884e4 - <unknown>\r\n  21:     0x7ff943c729ce - std::sys::thread::Thread::new::h117e066ad5633902\r\n  22:     0x7ff978638101 - BaseThreadInitThunk\r\n```\r\n```\r\nrustc 1.13.0-nightly (a7b2232d2 2016-09-07)\r\nbinary: rustc\r\ncommit-hash: a7b2232d20320dc3b4044a2aec1d51a129e7e17d\r\ncommit-date: 2016-09-07\r\nhost: x86_64-pc-windows-msvc\r\nrelease: 1.13.0-nightly\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/246167262","html_url":"https://github.com/rust-lang/rust/issues/36381#issuecomment-246167262","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/36381","id":246167262,"user":{"login":"TimNN","id":1178249,"avatar_url":"https://avatars.githubusercontent.com/u/1178249?v=3","gravatar_id":"","url":"https://api.github.com/users/TimNN","html_url":"https://github.com/TimNN","followers_url":"https://api.github.com/users/TimNN/followers","following_url":"https://api.github.com/users/TimNN/following{/other_user}","gists_url":"https://api.github.com/users/TimNN/gists{/gist_id}","starred_url":"https://api.github.com/users/TimNN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimNN/subscriptions","organizations_url":"https://api.github.com/users/TimNN/orgs","repos_url":"https://api.github.com/users/TimNN/repos","events_url":"https://api.github.com/users/TimNN/events{/privacy}","received_events_url":"https://api.github.com/users/TimNN/received_events","type":"User","site_admin":false},"created_at":"2016-09-11T07:50:01Z","updated_at":"2016-09-11T07:50:01Z","body":"So, as far as I can tell, the problem is that in something like `fn follow<'a>() -> <&'a str as StreamOnce>::Position`, `<&'a str as StreamOnce>::Position` is not resolved to `usize` in `normalize_associated_type`."}}
{"actor":{"display_login":"TimNN"}}