Open
Description
Currently a string literal with control characters like \0
or \v
is accepted without any warnings. The only exception is \r
, which gives a hard error.
It makes more sense to treat all non-printable, non \t, \n ASCII characters as a warning.
Steps to fix:
- Add
NonPrintableAsii
to EscapeError - Produce this error somewhere around here
- Add lexer-level tests
- Handle this "error" in
unespcape_error_reporting
. Note that, unlike other real errors, this one should be just a warning. - Adjust the affected ui tests
I am not sure how to make this warning work with #[allow]
lint infrastructure: we definitely can't do this in the lexer.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: The lexing & parsing of Rust source code to an ASTCategory: An issue proposing an enhancement or a PR with one.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language team