From 0270b50eb093304c563e1def677ef38a72ac53c1 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 1 Sep 2022 18:48:09 +0000 Subject: Recover unclosed char literal being parsed as lifetime --- compiler/rustc_errors/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 2f6686f8196..33b04ccaa23 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -461,6 +461,9 @@ pub enum StashKey { UnderscoreForArrayLengths, EarlySyntaxWarning, CallIntoMethod, + /// When an invalid lifetime e.g. `'2` should be reinterpreted + /// as a char literal in the parser + LifetimeIsChar, } fn default_track_diagnostic(_: &Diagnostic) {} -- cgit 1.4.1-3-g733a5