diff options
| author | Michael Goulet <michael@errs.io> | 2024-12-31 04:53:00 +0000 | 
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-12-31 04:53:00 +0000 | 
| commit | 54e33bbdeca62508a71c0e445f1d1c82eb0b48c3 (patch) | |
| tree | cf4fd07d91400f184815ecdc4ea1c17ebca38130 /tests/ui/parser/unicode-control-codepoints.rs | |
| parent | 4e5fec2f1ea4b1cfecaa14304c9f56de59b344cb (diff) | |
| download | rust-54e33bbdeca62508a71c0e445f1d1c82eb0b48c3.tar.gz rust-54e33bbdeca62508a71c0e445f1d1c82eb0b48c3.zip  | |
Account for C string literals in HiddenUnicodeCodepoints lint
Diffstat (limited to 'tests/ui/parser/unicode-control-codepoints.rs')
| -rw-r--r-- | tests/ui/parser/unicode-control-codepoints.rs | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/parser/unicode-control-codepoints.rs b/tests/ui/parser/unicode-control-codepoints.rs index df099bb62ad..c2b9a9911ac 100644 --- a/tests/ui/parser/unicode-control-codepoints.rs +++ b/tests/ui/parser/unicode-control-codepoints.rs @@ -1,3 +1,5 @@ +//@ edition: 2021 + fn main() { // if access_level != "user" { // Check if admin //~^ ERROR unicode codepoint changing visible direction of text present in comment @@ -25,6 +27,11 @@ fn main() { //~| ERROR non-ASCII character in raw byte string literal println!("{:?}", ''); //~^ ERROR unicode codepoint changing visible direction of text present in literal + + let _ = c""; + //~^ ERROR unicode codepoint changing visible direction of text present in literal + let _ = cr#""#; + //~^ ERROR unicode codepoint changing visible direction of text present in literal } //"/* } if isAdmin  begin admins only */"  | 
