Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/lexer/lex-bad-char-literals-4.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
155 B
Rust
Raw Normal View History

Display better snippet for invalid char literal Given this code: fn main() { let _ = 'abcd'; } The compiler would give a message like: error: character literal may only contain one codepoint: '; let _ = 'abcd'; ^~ With this change, the message now displays: error: character literal may only contain one codepoint: 'abcd' let _ = 'abcd' ^~~~~~ Fixes #30033
2016-01-07 16:12:28 +00:00
//
// This test needs to the last one appearing in this file as it kills the parser
testsuite: merge some lexer testcases Now that the lexer is more robust, these tests don't need to be in separate files. Yay!
2014-06-16 14:12:44 -07:00
static c: char =
introduce unescape module Currently, we deal with escape sequences twice: once when we lex a string, and a second time when we unescape literals. This PR aims to remove this duplication, by introducing a new `unescape` mode as a single source of truth for character escaping rules
2019-04-25 11:48:25 +03:00
'● //~ ERROR: unterminated character literal
Make most lexer errors non-fatal Most errors that arise in the lexer can be recovered from. This allows for more than one syntax error to be reported at a time.
2014-05-23 15:20:46 -07:00
;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4081ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API