]> git.lizzy.rs Git - rust.git/commit
Handle unterminated raw strings with no #s properly
authorRussell Cohen <russell.r.cohen@gmail.com>
Thu, 2 Apr 2020 04:08:58 +0000 (00:08 -0400)
committerRussell Cohen <russell.r.cohen@gmail.com>
Thu, 2 Apr 2020 05:02:55 +0000 (01:02 -0400)
commitf543689eb65aeacb6ec85c07f0c82800174d21c1
tree370f8aaebf7c5397d96eaaa5453ce78bfe0da558
parent76b11980ad416c3ad6143504c2277757ecacf9b5
Handle unterminated raw strings with no #s properly

The modified code to handle parsing raw strings didn't properly account for the case where there was no "#" on either end and erroneously reported this strings as complete. This lead to a panic trying to read off the end of the file.
src/librustc_lexer/src/lib.rs
src/librustc_lexer/src/tests.rs
src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.rs [new file with mode: 0644]
src/test/ui/parser/raw/issue-70677-panic-on-unterminated-raw-str-at-eof.stderr [new file with mode: 0644]