Add initial support for raw lifetimes
This commit is contained in:
parent
3b3e43a386
commit
97910580aa
18 changed files with 116 additions and 40 deletions
|
@ -172,6 +172,10 @@ pub(super) fn decorate_lint(sess: &Session, diagnostic: BuiltinLintDiag, diag: &
|
|||
}
|
||||
.decorate_lint(diag);
|
||||
}
|
||||
BuiltinLintDiag::RawPrefix(label_span) => {
|
||||
lints::RawPrefix { label: label_span, suggestion: label_span.shrink_to_hi() }
|
||||
.decorate_lint(diag);
|
||||
}
|
||||
BuiltinLintDiag::UnusedBuiltinAttribute { attr_name, macro_name, invoc_span } => {
|
||||
lints::UnusedBuiltinAttribute { invoc_span, attr_name, macro_name }.decorate_lint(diag);
|
||||
}
|
||||
|
|
|
@ -2772,6 +2772,15 @@ pub(crate) struct ReservedPrefix {
|
|||
pub prefix: String,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_raw_prefix)]
|
||||
pub(crate) struct RawPrefix {
|
||||
#[label]
|
||||
pub label: Span,
|
||||
#[suggestion(code = " ", applicability = "machine-applicable")]
|
||||
pub suggestion: Span,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_unused_builtin_attribute)]
|
||||
pub(crate) struct UnusedBuiltinAttribute {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue