UPDATE - rename DiagnosticHandler trait to IntoDiagnostic
This commit is contained in:
parent
5b8152807c
commit
19b348fed4
46 changed files with 659 additions and 584 deletions
|
@ -1,11 +1,11 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use rustc_errors::IntoDiagnostic;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
use rustc_errors::SessionDiagnostic;
|
||||
use rustc_macros::{LintDiagnostic, SessionDiagnostic};
|
||||
use rustc_macros::{DiagnosticHandler, LintDiagnostic};
|
||||
use rustc_span::Span;
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[derive(DiagnosticHandler)]
|
||||
#[diag(monomorphize::recursion_limit)]
|
||||
pub struct RecursionLimit {
|
||||
#[primary_span]
|
||||
|
@ -19,7 +19,7 @@ pub struct RecursionLimit {
|
|||
pub path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[derive(DiagnosticHandler)]
|
||||
#[diag(monomorphize::type_length_limit)]
|
||||
#[help(monomorphize::consider_type_length_limit)]
|
||||
pub struct TypeLengthLimit {
|
||||
|
@ -32,7 +32,7 @@ pub struct TypeLengthLimit {
|
|||
pub type_length: usize,
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[derive(DiagnosticHandler)]
|
||||
#[diag(monomorphize::requires_lang_item)]
|
||||
pub struct RequiresLangItem {
|
||||
pub lang_item: String,
|
||||
|
@ -44,7 +44,7 @@ pub struct UnusedGenericParams {
|
|||
pub param_names: Vec<String>,
|
||||
}
|
||||
|
||||
impl SessionDiagnostic<'_> for UnusedGenericParams {
|
||||
impl IntoDiagnostic<'_> for UnusedGenericParams {
|
||||
fn into_diagnostic(
|
||||
self,
|
||||
handler: &'_ rustc_errors::Handler,
|
||||
|
@ -72,11 +72,11 @@ pub struct LargeAssignmentsLint {
|
|||
pub limit: u64,
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[derive(DiagnosticHandler)]
|
||||
#[diag(monomorphize::unknown_partition_strategy)]
|
||||
pub struct UnknownPartitionStrategy;
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
#[derive(DiagnosticHandler)]
|
||||
#[diag(monomorphize::symbol_already_defined)]
|
||||
pub struct SymbolAlreadyDefined {
|
||||
#[primary_span]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue