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 @@ -191,7 +191,7 @@ pub(crate) fn emit_unescape_error(
191191 handler. span_err ( span, "empty character literal" )
192192 }
193193 EscapeError :: LoneSlash => {
194- panic ! ( "lexer accepted unterminated literal with trailing slash")
194+ handler . span_err ( span , "invalid trailing slash in literal ")
195195 }
196196 }
197197}
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