diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2024-03-26 20:16:08 -0400 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-08-01 16:52:28 +0200 |
commit | 3435f4e92b06747eb7d3777e8f60aa80bc495263 (patch) | |
tree | 0b5da473479383a7e1f24efa303f3d40630e93e3 /gcc/testsuite/rust/compile/raw-byte-string-loc.rs | |
parent | 957b4ff94ed91490f168cfabc5ee73cc6cd2191b (diff) | |
download | gcc-3435f4e92b06747eb7d3777e8f60aa80bc495263.zip gcc-3435f4e92b06747eb7d3777e8f60aa80bc495263.tar.gz gcc-3435f4e92b06747eb7d3777e8f60aa80bc495263.tar.bz2 |
gccrs: Improve parsing of raw byte string literals
gcc/rust/ChangeLog:
* lex/rust-lex.cc
(Lexer::parse_raw_byte_string):
Bring handling of edge cases to par with parse_byte_string.
gcc/testsuite/ChangeLog:
* rust/compile/raw-byte-string-loc.rs: New test.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/testsuite/rust/compile/raw-byte-string-loc.rs')
-rw-r--r-- | gcc/testsuite/rust/compile/raw-byte-string-loc.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/raw-byte-string-loc.rs b/gcc/testsuite/rust/compile/raw-byte-string-loc.rs new file mode 100644 index 0000000..f37d3f9 --- /dev/null +++ b/gcc/testsuite/rust/compile/raw-byte-string-loc.rs @@ -0,0 +1,6 @@ +const X: &'static u8 = br#"12 +12"#; + +BREAK +// { dg-error "unrecognised token" "" { target *-*-* } .-1 } +// { dg-excess-errors "error 'failed to parse item' does not have location" } |