about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorRyan Levick <ryan.levick@gmail.com>2020-12-04 11:33:30 +0100
committerRyan Levick <ryan.levick@gmail.com>2020-12-04 11:33:30 +0100
commit823f64532c2f234db14d09ab51bf73a6b71d8e0e (patch)
treebeeb7d37cdb35fe45bc355b79e0eb8d502c5cc66 /compiler/rustc_parse/src
parent1f95c91c887acb2d0c49f549a07025178b818d87 (diff)
downloadrust-823f64532c2f234db14d09ab51bf73a6b71d8e0e.tar.gz
rust-823f64532c2f234db14d09ab51bf73a6b71d8e0e.zip
A slightly clearer diagnostic when misusing
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index b746256f5fe..22f308ff36d 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -264,7 +264,7 @@ impl TokenType {
             TokenType::Ident => "identifier".to_string(),
             TokenType::Path => "path".to_string(),
             TokenType::Type => "type".to_string(),
-            TokenType::Const => "const".to_string(),
+            TokenType::Const => "a const expression".to_string(),
         }
     }
 }