{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1654","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1654/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1654/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1654/events","html_url":"https://github.com/rust-lang/rfcs/issues/1654","id":161002656,"number":1654,"title":"Add support for '\\{' and '\\}' escape sequences","user":{"login":"JonDahm","id":837951,"avatar_url":"https://avatars.githubusercontent.com/u/837951?v=3","gravatar_id":"","url":"https://api.github.com/users/JonDahm","html_url":"https://github.com/JonDahm","followers_url":"https://api.github.com/users/JonDahm/followers","following_url":"https://api.github.com/users/JonDahm/following{/other_user}","gists_url":"https://api.github.com/users/JonDahm/gists{/gist_id}","starred_url":"https://api.github.com/users/JonDahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonDahm/subscriptions","organizations_url":"https://api.github.com/users/JonDahm/orgs","repos_url":"https://api.github.com/users/JonDahm/repos","events_url":"https://api.github.com/users/JonDahm/events{/privacy}","received_events_url":"https://api.github.com/users/JonDahm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-18T02:31:49Z","updated_at":"2016-06-18T04:34:35Z","closed_at":null,"body":"The current way to escape curly braces in format strings (the only place they really need to be escaped) is with `\"{{\"` or `\"}}\"`, which feels inconsistent with (as far as I know) every other escaped character in Rust strings. I am at least happy that `\"{{{}}}\"` properly parses as a format argument curly braces around it, but it would be nice to escape curly braces in the same manner I escape other characters."},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/226921389","html_url":"https://github.com/rust-lang/rfcs/issues/1654#issuecomment-226921389","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1654","id":226921389,"user":{"login":"bjz","id":695077,"avatar_url":"https://avatars.githubusercontent.com/u/695077?v=3","gravatar_id":"","url":"https://api.github.com/users/bjz","html_url":"https://github.com/bjz","followers_url":"https://api.github.com/users/bjz/followers","following_url":"https://api.github.com/users/bjz/following{/other_user}","gists_url":"https://api.github.com/users/bjz/gists{/gist_id}","starred_url":"https://api.github.com/users/bjz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjz/subscriptions","organizations_url":"https://api.github.com/users/bjz/orgs","repos_url":"https://api.github.com/users/bjz/repos","events_url":"https://api.github.com/users/bjz/events{/privacy}","received_events_url":"https://api.github.com/users/bjz/received_events","type":"User","site_admin":false},"created_at":"2016-06-18T04:34:35Z","updated_at":"2016-06-18T04:34:35Z","body":"Here is the reasoning behind the odd escape syntax:\r\n\r\nThe Rust parser expands escaped characters in string literals before they reach syntax syntax extensions. Therefore there was no way for syntax extensions to differentiate between `\"\\{\"` and `\"{\"`. To solve this problem we had to come up with another escaping method for format strings, hence `\"{{\"`."}}
{"actor":{"display_login":"bjz"}}