{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/30715","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/30715/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/30715/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/30715/events","html_url":"https://github.com/rust-lang/rust/issues/30715","id":124981181,"number":30715,"title":"ICE on macro expansion in nightly, but not beta.","user":{"login":"Sean1708","id":5058711,"avatar_url":"https://avatars.githubusercontent.com/u/5058711?v=3","gravatar_id":"","url":"https://api.github.com/users/Sean1708","html_url":"https://github.com/Sean1708","followers_url":"https://api.github.com/users/Sean1708/followers","following_url":"https://api.github.com/users/Sean1708/following{/other_user}","gists_url":"https://api.github.com/users/Sean1708/gists{/gist_id}","starred_url":"https://api.github.com/users/Sean1708/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sean1708/subscriptions","organizations_url":"https://api.github.com/users/Sean1708/orgs","repos_url":"https://api.github.com/users/Sean1708/repos","events_url":"https://api.github.com/users/Sean1708/events{/privacy}","received_events_url":"https://api.github.com/users/Sean1708/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":{"login":"nrc","id":762626,"avatar_url":"https://avatars.githubusercontent.com/u/762626?v=3","gravatar_id":"","url":"https://api.github.com/users/nrc","html_url":"https://github.com/nrc","followers_url":"https://api.github.com/users/nrc/followers","following_url":"https://api.github.com/users/nrc/following{/other_user}","gists_url":"https://api.github.com/users/nrc/gists{/gist_id}","starred_url":"https://api.github.com/users/nrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrc/subscriptions","organizations_url":"https://api.github.com/users/nrc/orgs","repos_url":"https://api.github.com/users/nrc/repos","events_url":"https://api.github.com/users/nrc/events{/privacy}","received_events_url":"https://api.github.com/users/nrc/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-01-05T14:51:17Z","updated_at":"2016-01-07T23:27:43Z","closed_at":"2016-01-07T06:33:05Z","body":"I can't really pin down the exact cause of this, but a MWE is [here](http://is.gd/jxf5uC). Compiling on beta produces a normal error, but the nightly compiler panics.\r\n\r\nOn my machine:\r\n\r\n```sh\r\n$ cat main.rs\r\n#[macro_export]\r\nmacro_rules! parallel {\r\n    (\r\n        $( let $priv_id:ident = $ex:expr; )*\r\n        for $id:ident in $iter:expr {\r\n            $( $inner:expr; )*\r\n        }\r\n    ) => {{\r\n        $( let mut $priv_id = $ex; )*\r\n        for $id in $iter {\r\n            $( $inner; )*\r\n        }\r\n    }};\r\n}\r\n\r\n\r\nfn main() {\r\n    let n = 10000;\r\n\r\n    parallel! {\r\n        let x = 0;\r\n        for i in 0..n {\r\n            x += i;\r\n        }\r\n    }\r\n}\r\n$ multirust --version\r\nmultirust 0.7.0 (b222fcd27 2015-09-24 10:53:38 -0700)\r\n$ multirust run beta rustc --version\r\nrustc 1.6.0-beta.1 (2e48b593c 2015-12-09)\r\n$ multirust run beta rustc main.rs\r\nmain.rs:23:15: 23:17 error: expected `:`, found `+=`\r\nmain.rs:23             x += i;\r\n                         ^~\r\nmain.rs:23:15: 23:17 error: no rules expected the token `+=`\r\nmain.rs:23             x += i;\r\n                         ^~\r\n$ multirust run nightly rustc --version\r\nrustc 1.7.0-nightly (d5e229057 2016-01-04)\r\n$ RUST_BACKTRACE=1 multirust run nightly rustc main.rs\r\nerror: internal compiler error: Error constructed but not emitted\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\nstack backtrace:\r\n   1:        0x10a012d68 - sys::backtrace::tracing::imp::write::h766e1257c1f84926B0t\r\n   2:        0x10a01911f - panicking::default_handler::_<closure>::closure.42357\r\n   3:        0x10a018b62 - panicking::default_handler::h68d3e445172abaccSXx\r\n   4:        0x109fe0c34 - sys_common::unwind::begin_unwind_inner::hc0cc487f54c9cc74D3s\r\n   5:        0x109731234 - sys_common::unwind::begin_unwind::h13547604483651865760\r\n   6:        0x1097383ff - errors..DiagnosticBuilder::drop.55913::h960f3327a38997ec\r\n   7:        0x109867e13 - parse::parser::Parser<'a>::parse_assoc_expr_with::h54bfe9d5867b9a2atNK\r\n   8:        0x109a482ac - ext::tt::macro_parser::parse_nt::ha045d533d9473e78JUd\r\n   9:        0x109779628 - ext::tt::macro_parser::parse::h3081a47c878f0d47yEd\r\n  10:        0x109776522 - ast::TokenTree::parse::hff59eeb2ee1d439eMoo\r\n  11:        0x109a4b729 - ext::tt::macro_rules::MacroRulesMacroExpander.TTMacroExpander::expand::h9612813d3dcdb29c2he\r\n  12:        0x109998703 - ext::expand::expand_expr::_<closure>::closure.67968\r\n  13:        0x109996db7 - ext::expand::expand_expr::hae69d05227aa6495ZH9\r\n  14:        0x1099e0ff9 - option::Option<T>::map::h15133355466387097982\r\n  15:        0x1099dfe92 - ptr::P<T>::map::h8018096219495759744\r\n  16:        0x1099dfc19 - ext::expand::expand_block::hd439b735ebedccdb8ja\r\n  17:        0x1099bc3f6 - ext::expand::expand_and_rename_fn_decl_and_block::h5ffad287890948b2dIa\r\n  18:        0x1099c9c46 - ext::expand::expand_item_underscore::h21fd83f940aaf048jY9\r\n  19:        0x109a004ba - fold::noop_fold_item_simple::h11114274549110489552\r\n  20:        0x109a00059 - fold::noop_fold_item::h14585974302004177293\r\n  21:        0x1099c7caa - ext::expand::expand_annotatable::h8c7d426b1e137197Zua\r\n  22:        0x1099c4058 - ext::expand::expand_item::h39bd2724f5135651IX9\r\n  23:        0x1099d0379 - fold::noop_fold_mod::h1378000857864055771\r\n  24:        0x1099ca411 - ext::expand::expand_item_underscore::h21fd83f940aaf048jY9\r\n  25:        0x109a004ba - fold::noop_fold_item_simple::h11114274549110489552\r\n  26:        0x109a00059 - fold::noop_fold_item::h14585974302004177293\r\n  27:        0x1099c89e7 - ext::expand::expand_annotatable::h8c7d426b1e137197Zua\r\n  28:        0x1099c4058 - ext::expand::expand_item::h39bd2724f5135651IX9\r\n  29:        0x109a099d7 - ext::expand::expand_crate::h2fc8fffdacba03543Sa\r\n  30:        0x105fc49f3 - driver::phase_2_configure_and_expand::_<closure>::closure.31431\r\n  31:        0x105f5ba1f - driver::phase_2_configure_and_expand::h7778ea873c616208kya\r\n  32:        0x105f3b052 - driver::compile_input::ha0a3752393232affjca\r\n  33:        0x105f2ea7f - run_compiler::hc39777399ed593a2Lwc\r\n  34:        0x105f2b77c - sys_common::unwind::try::try_fn::h14272627946465103852\r\n  35:        0x10a010898 - __rust_try\r\n  36:        0x10a00865e - sys_common::unwind::try::inner_try::hb4e0e5e0be40f8b5b0s\r\n  37:        0x105f2bb51 - boxed::F.FnBox<A>::call_box::h8681487165422399260\r\n  38:        0x10a017ebd - sys::thread::Thread::new::thread_start::h513501a6a141d3f0fdx\r\n  39:     0x7fff8f919c12 - _pthread_body\r\n  40:     0x7fff8f919b8f - _pthread_start\r\nthread 'rustc' panicked at 'explicit panic', ../src/libsyntax/errors/mod.rs:261\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/169839623","html_url":"https://github.com/rust-lang/rust/issues/30715#issuecomment-169839623","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/30715","id":169839623,"user":{"login":"pnkfelix","id":173127,"avatar_url":"https://avatars.githubusercontent.com/u/173127?v=3","gravatar_id":"","url":"https://api.github.com/users/pnkfelix","html_url":"https://github.com/pnkfelix","followers_url":"https://api.github.com/users/pnkfelix/followers","following_url":"https://api.github.com/users/pnkfelix/following{/other_user}","gists_url":"https://api.github.com/users/pnkfelix/gists{/gist_id}","starred_url":"https://api.github.com/users/pnkfelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnkfelix/subscriptions","organizations_url":"https://api.github.com/users/pnkfelix/orgs","repos_url":"https://api.github.com/users/pnkfelix/repos","events_url":"https://api.github.com/users/pnkfelix/events{/privacy}","received_events_url":"https://api.github.com/users/pnkfelix/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T23:27:43Z","updated_at":"2016-01-07T23:27:43Z","body":"I don't know if anyone cares, but that macro is going to get broken for a different reason when the new macro future proofing lands (https://github.com/rust-lang/rfcs/pull/1384 and https://github.com/rust-lang/rust/issues/30450 )"}}