{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1102","repository_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt","labels_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1102/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1102/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/1102/events","html_url":"https://github.com/rust-lang-nursery/rustfmt/issues/1102","id":166193931,"number":1102,"title":"The following code snippet produces an internal compiler error when provided to rustfmt","user":{"login":"cgswords","id":1130991,"avatar_url":"https://avatars.githubusercontent.com/u/1130991?v=3","gravatar_id":"","url":"https://api.github.com/users/cgswords","html_url":"https://github.com/cgswords","followers_url":"https://api.github.com/users/cgswords/followers","following_url":"https://api.github.com/users/cgswords/following{/other_user}","gists_url":"https://api.github.com/users/cgswords/gists{/gist_id}","starred_url":"https://api.github.com/users/cgswords/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgswords/subscriptions","organizations_url":"https://api.github.com/users/cgswords/orgs","repos_url":"https://api.github.com/users/cgswords/repos","events_url":"https://api.github.com/users/cgswords/events{/privacy}","received_events_url":"https://api.github.com/users/cgswords/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-18T21:07:57Z","updated_at":"2016-07-18T21:07:57Z","closed_at":null,"body":"Title says it all. I produces some hideous code via the `libsyntax`'s pretty-printer and `rustfmt` crashed when I tried to use it.\r\n\r\n```\r\n$ rustfmt out.rs \r\nerror: internal compiler error: Error constructed but not emitted\r\nthread '<main>' panicked at 'explicit panic', /home/cswords/.cargo/registry/src/github.com-1ecc6299db9ec823/syntex_syntax-0.32.0/src/errors/mod.rs:361\r\n```\r\n\r\n```\r\n  {\r\n  let tmp = ( test ) ; let tmp = ( rest ) ; let qdl_tmp = {\r\n  let mut output : Vec < TokenTree > = Vec :: new (  ) ; ; output .\r\n  to_appendable (  ) } ; let qdl_tmp = {\r\n  let mut output : Vec < TokenTree > = Vec :: new (  ) ; ; output .\r\n  to_appendable (  ) } ; let qdl_tmp = TokenTree :: Token (\r\n  DUMMY_SP , Token :: Not ) , TokenTree :: Delimited (\r\n  DUMMY_SP , Rc :: new (\r\n  Delimited {\r\n  delim : token :: DelimToken :: Paren , open_span : DUMMY_SP , tts : qdl_tmp ,\r\n  close_span : DUMMY_SP , } ) ) . to_appendable (  ) ; let qdl_tmp = {\r\n  let mut output : Vec < TokenTree > = Vec :: new (  ) ; ; output . append (\r\n  & mut vec ! ( tmp ) . to_appendable (  ) ) ; output . to_appendable (  ) } ;\r\n  let qdl_tmp = TokenTree :: Token (\r\n  DUMMY_SP , Token :: Ident ( str_to_ident ( \"cond\" ) ) ) , TokenTree :: Token (\r\n  DUMMY_SP , Token :: Not ) , TokenTree :: Delimited (\r\n  DUMMY_SP , Rc :: new (\r\n  Delimited {\r\n  delim : token :: DelimToken :: Paren , open_span : DUMMY_SP , tts : qdl_tmp ,\r\n  close_span : DUMMY_SP , } ) ) . to_appendable (  ) ; let qdl_tmp = TokenTree\r\n  :: Token ( DUMMY_SP , Token :: Ident ( str_to_ident ( \"else\" ) ) ) , TokenTree\r\n  :: Delimited (\r\n  DUMMY_SP , Rc :: new (\r\n  Delimited {\r\n  delim : token :: DelimToken :: Brace , open_span : DUMMY_SP , tts : qdl_tmp ,\r\n  close_span : DUMMY_SP , } ) ) . to_appendable (  ) ; let qdl_tmp = TokenTree\r\n  :: Token ( DUMMY_SP , Token :: Ident ( str_to_ident ( \"quote\" ) ) ) ,\r\n  TokenTree :: Token ( DUMMY_SP , Token :: Not ) , TokenTree :: Delimited (\r\n  DUMMY_SP , Rc :: new (\r\n  Delimited {\r\n  delim : token :: DelimToken :: Paren , open_span : DUMMY_SP , tts : qdl_tmp ,\r\n  close_span : DUMMY_SP , } ) ) . to_appendable (  ) ; let qdl_tmp = TokenTree\r\n  :: Token ( DUMMY_SP , Token :: Ident ( str_to_ident ( \"if\" ) ) ) , TokenTree\r\n  :: Token ( DUMMY_SP , Token :: Ident ( str_to_ident ( \"rest\" ) ) ) , TokenTree\r\n  :: Token ( DUMMY_SP , Token :: Dot ) , TokenTree :: Token (\r\n  DUMMY_SP , Token :: Ident ( str_to_ident ( \"is_empty\" ) ) ) , TokenTree ::\r\n  Delimited (\r\n  DUMMY_SP , Rc :: new (\r\n  Delimited {\r\n  delim : token :: DelimToken :: Paren , open_span : DUMMY_SP , tts : qdl_tmp ,\r\n  close_span : DUMMY_SP , } ) ) TokenTree :: Delimited (\r\n  DUMMY_SP , Rc :: new (\r\n  Delimited {\r\n  delim : token :: DelimToken :: Brace , open_span : DUMMY_SP , tts : qdl_tmp ,\r\n  close_span : DUMMY_SP , } ) ) TokenTree :: Token (\r\n  DUMMY_SP , Token :: Ident ( str_to_ident ( \"else\" ) ) ) , TokenTree ::\r\n  Delimited (\r\n  DUMMY_SP , Rc :: new (\r\n  Delimited {\r\n  delim : token :: DelimToken :: Brace , open_span : DUMMY_SP , tts : qdl_tmp ,\r\n  close_span : DUMMY_SP , } ) ) . to_appendable (  ) ; {\r\n  let mut output : Vec < TokenTree > = Vec :: new (  ) ; ; output . append (\r\n  & mut vec ! (\r\n  TokenTree :: Token ( DUMMY_SP , Token :: Ident ( str_to_ident ( \"if\" ) ) ) , )\r\n  . to_appendable (  ) ) ; output . append (\r\n  & mut vec ! ( tmp ) . to_appendable (  ) ) ; output . append (\r\n  & mut vec ! (\r\n  TokenTree :: Token ( DUMMY_SP , Token :: Dollar ) , TokenTree :: Delimited (\r\n  DUMMY_SP , Rc :: new (\r\n  Delimited {\r\n  delim : token :: DelimToken :: Paren , open_span : DUMMY_SP , tts : qdl_tmp ,\r\n  close_span : DUMMY_SP , } ) ) ) . to_appendable (  ) ) ; output .\r\n  to_appendable (  ) } }\r\n```\r\n"}}
{"actor":{"display_login":"cgswords"}}