]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #47914 - etaoins:improve-char-escape-in-lexer-msg, r=petrochenkov...
authorkennytm <kennytm@gmail.com>
Fri, 2 Feb 2018 08:29:20 +0000 (16:29 +0800)
committerkennytm <kennytm@gmail.com>
Fri, 2 Feb 2018 14:48:46 +0000 (22:48 +0800)
commitb4b73a1d95814d56cdb34720d6fb01544a1e8d11
tree51e89553bb0944d312d067d4b4cc2daec3c48547
parent2e3a8f51595e3af985425520f1cba1bce4423979
parentb9441f2428f501de15dcb00af8da255a70302a0d
Rollup merge of #47914 - etaoins:improve-char-escape-in-lexer-msg, r=petrochenkov Improve char escaping in lexer messages Currently ', " and \ are escaped as \', \" and \\ respectively. This leads to confusing messages such as `error: unknown start of token: \\` when encountering a single backslash. Fix by emitting printable ASCII characters directly. This will still escape \r, \n, \t and Unicode characters. Fixes #47902