Reserve guarded string literals (RFC 3593)
This commit is contained in:
parent
6f4ae0f345
commit
321a5db7d4
23 changed files with 1514 additions and 9 deletions
|
@ -2110,6 +2110,24 @@ pub(crate) enum UnknownPrefixSugg {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_reserved_string)]
|
||||
#[note]
|
||||
pub(crate) struct ReservedString {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
#[subdiagnostic]
|
||||
pub sugg: Option<GuardedStringSugg>,
|
||||
}
|
||||
#[derive(Subdiagnostic)]
|
||||
#[suggestion(
|
||||
parse_suggestion_whitespace,
|
||||
code = " ",
|
||||
applicability = "maybe-incorrect",
|
||||
style = "verbose"
|
||||
)]
|
||||
pub(crate) struct GuardedStringSugg(#[primary_span] pub Span);
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_too_many_hashes)]
|
||||
pub(crate) struct TooManyHashes {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue