From ec920ce096551764ccf79b9e480d2f133e30c504 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 29 Feb 2024 16:34:08 +1100 Subject: [PATCH] Rename `DiagnosticExt` as `DiagExt`. --- clippy_lints/src/inline_fn_without_body.rs | 2 +- clippy_lints/src/new_without_default.rs | 2 +- clippy_utils/src/sugg.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/inline_fn_without_body.rs b/clippy_lints/src/inline_fn_without_body.rs index bc236c5c71f..83ecaeef982 100644 --- a/clippy_lints/src/inline_fn_without_body.rs +++ b/clippy_lints/src/inline_fn_without_body.rs @@ -1,7 +1,7 @@ //! checks for `#[inline]` on trait methods without bodies use clippy_utils::diagnostics::span_lint_and_then; -use clippy_utils::sugg::DiagnosticExt; +use clippy_utils::sugg::DiagExt; use rustc_ast::ast::Attribute; use rustc_errors::Applicability; use rustc_hir::{TraitFn, TraitItem, TraitItemKind}; diff --git a/clippy_lints/src/new_without_default.rs b/clippy_lints/src/new_without_default.rs index b3b8a5e9963..627b4968d9f 100644 --- a/clippy_lints/src/new_without_default.rs +++ b/clippy_lints/src/new_without_default.rs @@ -1,7 +1,7 @@ use clippy_utils::diagnostics::span_lint_hir_and_then; use clippy_utils::return_ty; use clippy_utils::source::snippet; -use clippy_utils::sugg::DiagnosticExt; +use clippy_utils::sugg::DiagExt; use rustc_errors::Applicability; use rustc_hir as hir; use rustc_hir::HirIdSet; diff --git a/clippy_utils/src/sugg.rs b/clippy_utils/src/sugg.rs index d2ec327534a..e74621a0fbb 100644 --- a/clippy_utils/src/sugg.rs +++ b/clippy_utils/src/sugg.rs @@ -685,7 +685,7 @@ fn indentation(cx: &T, span: Span) -> Option { } /// Convenience extension trait for `Diag`. -pub trait DiagnosticExt { +pub trait DiagExt { /// Suggests to add an attribute to an item. /// /// Correctly handles indentation of the attribute and item. @@ -732,7 +732,7 @@ fn suggest_item_with_attr( fn suggest_remove_item(&mut self, cx: &T, item: Span, msg: &str, applicability: Applicability); } -impl DiagnosticExt for rustc_errors::Diag<'_, ()> { +impl DiagExt for rustc_errors::Diag<'_, ()> { fn suggest_item_with_attr( &mut self, cx: &T,