Skip to content

Commit

Permalink
fix rustdoc test
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Mar 17, 2024
1 parent ea1883d commit f4d30b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/lexer/unescape_error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub(crate) fn emit_unescape_error(
}
escaped.push(c);
}
if escaped.len() != lit.len() {
if escaped.len() != lit.len() || full_lit_span.is_empty() {
let sugg = format!("{prefix}\"{escaped}\"");
MoreThanOneCharSugg::QuotesFull {
span: full_lit_span,
Expand Down

0 comments on commit f4d30b1

Please sign in to comment.