summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_trait_selection/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_trait_selection/src/errors.rs')
-rw-r--r--compiler/rustc_trait_selection/src/errors.rs46
1 files changed, 23 insertions, 23 deletions
diff --git a/compiler/rustc_trait_selection/src/errors.rs b/compiler/rustc_trait_selection/src/errors.rs
index ab0afc545..7f8705824 100644
--- a/compiler/rustc_trait_selection/src/errors.rs
+++ b/compiler/rustc_trait_selection/src/errors.rs
@@ -1,11 +1,11 @@
-use rustc_errors::{fluent, ErrorGuaranteed, Handler};
-use rustc_macros::SessionDiagnostic;
-use rustc_middle::ty::{PolyTraitRef, Ty, Unevaluated};
-use rustc_session::{Limit, SessionDiagnostic};
+use rustc_errors::{fluent, ErrorGuaranteed, Handler, IntoDiagnostic};
+use rustc_macros::Diagnostic;
+use rustc_middle::ty::{self, PolyTraitRef, Ty};
+use rustc_session::Limit;
use rustc_span::{Span, Symbol};
-#[derive(SessionDiagnostic)]
-#[diag(trait_selection::dump_vtable_entries)]
+#[derive(Diagnostic)]
+#[diag(trait_selection_dump_vtable_entries)]
pub struct DumpVTableEntries<'a> {
#[primary_span]
pub span: Span,
@@ -13,17 +13,17 @@ pub struct DumpVTableEntries<'a> {
pub entries: String,
}
-#[derive(SessionDiagnostic)]
-#[diag(trait_selection::unable_to_construct_constant_value)]
+#[derive(Diagnostic)]
+#[diag(trait_selection_unable_to_construct_constant_value)]
pub struct UnableToConstructConstantValue<'a> {
#[primary_span]
pub span: Span,
- pub unevaluated: Unevaluated<'a>,
+ pub unevaluated: ty::UnevaluatedConst<'a>,
}
-#[derive(SessionDiagnostic)]
+#[derive(Diagnostic)]
#[help]
-#[diag(trait_selection::auto_deref_reached_recursion_limit, code = "E0055")]
+#[diag(trait_selection_auto_deref_reached_recursion_limit, code = "E0055")]
pub struct AutoDerefReachedRecursionLimit<'a> {
#[primary_span]
#[label]
@@ -33,24 +33,24 @@ pub struct AutoDerefReachedRecursionLimit<'a> {
pub crate_name: Symbol,
}
-#[derive(SessionDiagnostic)]
-#[diag(trait_selection::empty_on_clause_in_rustc_on_unimplemented, code = "E0232")]
+#[derive(Diagnostic)]
+#[diag(trait_selection_empty_on_clause_in_rustc_on_unimplemented, code = "E0232")]
pub struct EmptyOnClauseInOnUnimplemented {
#[primary_span]
#[label]
pub span: Span,
}
-#[derive(SessionDiagnostic)]
-#[diag(trait_selection::invalid_on_clause_in_rustc_on_unimplemented, code = "E0232")]
+#[derive(Diagnostic)]
+#[diag(trait_selection_invalid_on_clause_in_rustc_on_unimplemented, code = "E0232")]
pub struct InvalidOnClauseInOnUnimplemented {
#[primary_span]
#[label]
pub span: Span,
}
-#[derive(SessionDiagnostic)]
-#[diag(trait_selection::no_value_in_rustc_on_unimplemented, code = "E0232")]
+#[derive(Diagnostic)]
+#[diag(trait_selection_no_value_in_rustc_on_unimplemented, code = "E0232")]
#[note]
pub struct NoValueInOnUnimplemented {
#[primary_span]
@@ -66,12 +66,12 @@ pub struct NegativePositiveConflict<'a> {
pub positive_impl_span: Result<Span, Symbol>,
}
-impl SessionDiagnostic<'_> for NegativePositiveConflict<'_> {
+impl IntoDiagnostic<'_> for NegativePositiveConflict<'_> {
fn into_diagnostic(
self,
handler: &Handler,
) -> rustc_errors::DiagnosticBuilder<'_, ErrorGuaranteed> {
- let mut diag = handler.struct_err(fluent::trait_selection::negative_positive_conflict);
+ let mut diag = handler.struct_err(fluent::trait_selection_negative_positive_conflict);
diag.set_arg("trait_desc", self.trait_desc);
diag.set_arg(
"self_desc",
@@ -81,19 +81,19 @@ impl SessionDiagnostic<'_> for NegativePositiveConflict<'_> {
diag.code(rustc_errors::error_code!(E0751));
match self.negative_impl_span {
Ok(span) => {
- diag.span_label(span, fluent::trait_selection::negative_implementation_here);
+ diag.span_label(span, fluent::negative_implementation_here);
}
Err(cname) => {
- diag.note(fluent::trait_selection::negative_implementation_in_crate);
+ diag.note(fluent::negative_implementation_in_crate);
diag.set_arg("negative_impl_cname", cname.to_string());
}
}
match self.positive_impl_span {
Ok(span) => {
- diag.span_label(span, fluent::trait_selection::positive_implementation_here);
+ diag.span_label(span, fluent::positive_implementation_here);
}
Err(cname) => {
- diag.note(fluent::trait_selection::positive_implementation_in_crate);
+ diag.note(fluent::positive_implementation_in_crate);
diag.set_arg("positive_impl_cname", cname.to_string());
}
}