Add warning when whitespace is not skipped after an escaped newline.
This commit is contained in:
parent
1195bea5a7
commit
5d59b4412e
4 changed files with 75 additions and 8 deletions
|
@ -253,6 +253,12 @@ pub(crate) fn emit_unescape_error(
|
|||
let msg = "invalid trailing slash in literal";
|
||||
handler.struct_span_err(span, msg).span_label(span, msg).emit();
|
||||
}
|
||||
EscapeError::UnskippedWhitespaceWarning => {
|
||||
let (c, char_span) = last_char();
|
||||
let msg =
|
||||
format!("non-ASCII whitespace symbol '{}' is not skipped", c.escape_unicode());
|
||||
handler.struct_span_warn(span, &msg).span_label(char_span, &msg).emit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue