File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ pub(crate) fn emit_unescape_error(
190190 handler. span_err ( span, "empty character literal" )
191191 }
192192 EscapeError :: LoneSlash => {
193- panic ! ( "lexer accepted unterminated literal with trailing slash")
193+ handler . span_err ( span , "invalid trailing slash in literal ")
194194 }
195195 }
196196}
Original file line number Diff line number Diff line change 1+ "\u\\ "
2+ //~^ ERROR incorrect unicode escape sequence
3+ //~| ERROR invalid trailing slash in literal
Original file line number Diff line number Diff line change 1+ error: incorrect unicode escape sequence
2+ --> $DIR/issue-62913.rs:1:2
3+ |
4+ LL | "\u\"
5+ | ^^^ incorrect unicode escape sequence
6+ |
7+ = help: format of unicode escape sequences is `\u{...}`
8+
9+ error: invalid trailing slash in literal
10+ --> $DIR/issue-62913.rs:1:5
11+ |
12+ LL | "\u\"
13+ | ^
14+
15+ error: aborting due to 2 previous errors
16+
You can’t perform that action at this time.
0 commit comments