about summary refs log tree commit diff
path: root/src/test/ui/parser/raw
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-275/+0
2022-11-04Make non-ASCII errors more consistent.Nicholas Nethercote-2/+2
There are three kinds of "byte" literals: byte literals, byte string literals, and raw byte string literals. None are allowed to have non-ASCII chars in them. Two `EscapeError` variants exist for when that constraint is violated. - `NonAsciiCharInByte`: used for byte literals and byte string literals. - `NonAsciiCharInByteString`: used for raw byte string literals. As a result, the messages for raw byte string literals use different wording, without good reason. Also, byte string literals are incorrectly described as "byte constants" in some error messages. This commit eliminates `NonAsciiCharInByteString` so the three cases are handled similarly, and described correctly. The `mode` is enough to distinguish them. Note: Some existing error messages mention "byte constants" and some mention "byte literals". I went with the latter here, because it's a more correct name, as used by the Reference.
2022-04-23Better handle too many `#` recovery in raw strEsteban Küber-6/+50
Point at all the unnecessary trailing `#`. Better handle interaction with outer attributes when `;` is missing. Fix #95030.
2021-02-03Handle `Span`s for byte and raw strings and add more detailEsteban Küber-1/+1
2020-04-02Handle unterminated raw strings with no #s properlyRussell Cohen-0/+14
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.
2020-03-29More raw string testsRussell Cohen-1/+16
2020-03-29Cleanup error messages, improve docstringsRussell Cohen-4/+4
2020-03-29Improve error messages for raw strings (#60762)Russell Cohen-5/+25
This diff improves error messages around raw strings in a few ways: - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test) - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings - Detect potentially intended terminators (longest sequence of "#*" is suggested)
2020-03-27Move raw string tests into the raw directoryRussell Cohen-0/+79
2020-02-28Update UI testsGuillaume Gomez-1/+2
2019-12-03Accurately portray raw identifiers in error messagesEsteban Küber-4/+4
When refering to or suggesting raw identifiers, refer to them with `r#`. Fix #65634.
2019-11-06Remove "here" from "expected one of X here"Esteban Küber-3/+3
2019-10-28Tweak unexpected token wordingEsteban Küber-2/+2
2019-09-24Remove blanket silencing of "type annotation needed" errorsEsteban Küber-4/+4
Remove blanket check for existence of other errors before emitting "type annotation needed" errors, and add some eager checks to avoid adding obligations when they refer to types that reference `[type error]` in order to reduce unneded errors.
2019-07-12Do not emit type errors after parse error in last statement of blockEsteban Küber-14/+23
When recovering from a parse error inside a block, do not emit type errors generating on that block's recovered return expression. Fix #57383.
2019-03-16syntax: Introduce `Ident::can_be_raw`Vadim Petrochenkov-12/+14
2019-03-11Update testsVadim Petrochenkov-6/+6
2019-01-06tests: Do not use `-Z parse-only`, continue compilation to test recoveryVadim Petrochenkov-14/+30
2018-12-25Remove licensesMark Rousskov-46/+6
2018-10-21Make sure all ui/parse tests have `-Z parse-only`Vadim Petrochenkov-1/+3
Except those testing parsing during macro expansion
2018-10-21Move more parsing tests to ui/parserVadim Petrochenkov-0/+113