{"action":"created","issue":{"url":"https://api.github.com/repos/nrc/rustfmt/issues/397","labels_url":"https://api.github.com/repos/nrc/rustfmt/issues/397/labels{/name}","comments_url":"https://api.github.com/repos/nrc/rustfmt/issues/397/comments","events_url":"https://api.github.com/repos/nrc/rustfmt/issues/397/events","html_url":"https://github.com/nrc/rustfmt/issues/397","id":108900266,"number":397,"title":"Inappropriate backslash and whitespace removal and backslash insertion in string literal","user":{"login":"aarzee","id":3758364,"avatar_url":"https://avatars.githubusercontent.com/u/3758364?v=3","gravatar_id":"","url":"https://api.github.com/users/aarzee","html_url":"https://github.com/aarzee","followers_url":"https://api.github.com/users/aarzee/followers","following_url":"https://api.github.com/users/aarzee/following{/other_user}","gists_url":"https://api.github.com/users/aarzee/gists{/gist_id}","starred_url":"https://api.github.com/users/aarzee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarzee/subscriptions","organizations_url":"https://api.github.com/users/aarzee/orgs","repos_url":"https://api.github.com/users/aarzee/repos","events_url":"https://api.github.com/users/aarzee/events{/privacy}","received_events_url":"https://api.github.com/users/aarzee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nrc/rustfmt/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-29T15:56:10Z","updated_at":"2015-11-10T20:18:50Z","closed_at":null,"body":"rustfmt turns this string literal (from https://github.com/uutils/coreutils/blob/master/src/echo/echo.rs#L136-L156):\r\n\r\n```\r\n\"{0} {1} - display a line of text\r\nUsage:\r\n  {0} [SHORT-OPTION]... [STRING]...\r\n  {0} LONG-OPTION\r\nEcho the STRING(s) to standard output.\r\nIf -e is in effect, the following sequences are recognized:\r\n\\\\\\\\      backslash\r\n\\\\a      alert (BEL)\r\n\\\\b      backspace\r\n\\\\c      produce no further output\r\n\\\\e      escape\r\n\\\\f      form feed\r\n\\\\n      new line\r\n\\\\r      carriage return\r\n\\\\t      horizontal tab\r\n\\\\v      vertical tab\r\n\\\\0NNN   byte with octal value NNN (1 to 3 digits)\r\n\\\\xHH    byte with hexadecimal value HH (1 to 2 digits)\"\r\n```\r\n... into this:\r\n\r\n```\r\n\"{0} {1} - display a line of text\r\n\r\nUsage:\r\n  {0} [SHORT-OPTION]... \\\r\n                       [STRING]...\r\n  {0} LONG-OPTION\r\n\r\nEcho the STRING(s) to standard output.\r\nIf \\\r\n                       -e is in effect, the following sequences are recognized:\r\n\r\n\\\\\\backslash\r\n\\\r\n                       \\\\a      alert (BEL)\r\n\\\\b      backspace\r\n\\\\c      produce no further \\\r\n                       output\r\n\\\\e      escape\r\n\\\\f      form feed\r\n\\\\n      new line\r\n\\\\r      \\\r\n                       carriage return\r\n\\\\t      horizontal tab\r\n\\\\v      vertical tab\r\n\\\\0NNN   \\\r\n                       byte with octal value NNN (1 to 3 digits)\r\n\\\\xHH    byte with hexadecimal \\\r\n                       value HH (1 to 2 digits)\"\r\n```\r\n\r\nSince `\\b` is not a valid character escape, compilation fails."},"comment":{"url":"https://api.github.com/repos/nrc/rustfmt/issues/comments/155553700","html_url":"https://github.com/nrc/rustfmt/issues/397#issuecomment-155553700","issue_url":"https://api.github.com/repos/nrc/rustfmt/issues/397","id":155553700,"user":{"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},"created_at":"2015-11-10T20:18:50Z","updated_at":"2015-11-10T20:18:50Z","body":"small example (which I think is the same bug):\r\n\r\n```\r\n-    filename.replace(\" \", \"\\\\ \")\r\n+    filename.replace(\" \", \"\\\")\r\n```"}}