diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-12-03 19:01:42 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-12-03 19:01:42 -0800 |
| commit | f6b435d923e5979cd3579427901d2140a932dfc0 (patch) | |
| tree | 01dcd96d45f6bd4822ca60fc07ea2399571d1ccf /src/test/ui/parser | |
| parent | 7afe6d9d1f48b998cc88fe6f01ba0082788ba4b9 (diff) | |
| download | rust-f6b435d923e5979cd3579427901d2140a932dfc0.tar.gz rust-f6b435d923e5979cd3579427901d2140a932dfc0.zip | |
Accurately portray raw identifiers in error messages
When refering to or suggesting raw identifiers, refer to them with `r#`. Fix #65634.
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/raw/raw-literal-keywords.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/parser/raw/raw-literal-keywords.stderr | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/parser/raw/raw-literal-keywords.rs b/src/test/ui/parser/raw/raw-literal-keywords.rs index bf9cbcdab2e..a986980fab9 100644 --- a/src/test/ui/parser/raw/raw-literal-keywords.rs +++ b/src/test/ui/parser/raw/raw-literal-keywords.rs @@ -11,11 +11,11 @@ fn test_union() { } fn test_if_2() { - let _ = r#if; //~ ERROR cannot find value `if` in this scope + let _ = r#if; //~ ERROR cannot find value `r#if` in this scope } fn test_struct_2() { - let _ = r#struct; //~ ERROR cannot find value `struct` in this scope + let _ = r#struct; //~ ERROR cannot find value `r#struct` in this scope } fn test_union_2() { diff --git a/src/test/ui/parser/raw/raw-literal-keywords.stderr b/src/test/ui/parser/raw/raw-literal-keywords.stderr index fd8eda3770d..f7b6c894a90 100644 --- a/src/test/ui/parser/raw/raw-literal-keywords.stderr +++ b/src/test/ui/parser/raw/raw-literal-keywords.stderr @@ -16,13 +16,13 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found LL | r#union Test; | ^^^^ expected one of 8 possible tokens -error[E0425]: cannot find value `if` in this scope +error[E0425]: cannot find value `r#if` in this scope --> $DIR/raw-literal-keywords.rs:14:13 | LL | let _ = r#if; | ^^^^ not found in this scope -error[E0425]: cannot find value `struct` in this scope +error[E0425]: cannot find value `r#struct` in this scope --> $DIR/raw-literal-keywords.rs:18:13 | LL | let _ = r#struct; |
