Port DeprecatedMacro to diag structs

This commit is contained in:
Xiretza
2024-04-21 13:24:25 +00:00
parent c227f35a9c
commit 41a20b4c56
5 changed files with 153 additions and 97 deletions

View File

@@ -566,6 +566,13 @@ pub struct AmbiguityErrorDiag {
pub b2_help_msgs: Vec<String>,
}
#[derive(Debug, Clone)]
pub enum DeprecatedSinceKind {
InEffect,
InFuture,
InVersion(String),
}
// This could be a closure, but then implementing derive trait
// becomes hacky (and it gets allocated).
#[derive(Debug)]
@@ -589,8 +596,10 @@ pub enum BuiltinLintDiag {
RedundantImport(Vec<(Span, bool)>, Ident),
DeprecatedMacro {
suggestion: Option<Symbol>,
span: Span,
message: String,
suggestion_span: Span,
note: Option<Symbol>,
path: String,
since_kind: DeprecatedSinceKind,
},
MissingAbi(Span, Abi),
UnusedDocComment(Span),