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
9b67bd42b7cbf97f72d039afcba02f5177d0d68c
rust/src/test/ui/parser/lex-bad-char-literals-4.rs

6 lines
173 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 =
[WIP] Fix tests
2019-01-20 04:37:58 +09:00
'● //~ ERROR: character literal may only contain one codepoint
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: 2238ms 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