diff --git a/compiler/rustc_ast_passes/src/errors.rs b/compiler/rustc_ast_passes/src/errors.rs index 82fe2a21d0876..ab8015c4a43b6 100644 --- a/compiler/rustc_ast_passes/src/errors.rs +++ b/compiler/rustc_ast_passes/src/errors.rs @@ -77,13 +77,6 @@ pub struct ForbiddenLifetimeBound { pub spans: Vec, } -#[derive(Diagnostic)] -#[diag(ast_passes_forbidden_non_lifetime_param)] -pub struct ForbiddenNonLifetimeParam { - #[primary_span] - pub spans: Vec, -} - #[derive(Diagnostic)] #[diag(ast_passes_fn_param_too_many)] pub struct FnParamTooMany { diff --git a/compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs b/compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs index 2a32f0b504737..7293de4c6c5e5 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs @@ -139,7 +139,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { tcx, generics, diag, - &format!("{}", proj.self_ty()), + &proj.self_ty().to_string(), &path, None, matching_span, @@ -153,7 +153,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { tcx, generics, diag, - &format!("{}", proj.self_ty()), + &proj.self_ty().to_string(), &path, None, matching_span,