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, diff --git a/tests/ui-internal/disallow_span_lint.rs b/tests/ui-internal/disallow_span_lint.rs index b9b4a07d29d..c5029bbd9a4 100644 --- a/tests/ui-internal/disallow_span_lint.rs +++ b/tests/ui-internal/disallow_span_lint.rs @@ -5,12 +5,17 @@ extern crate rustc_lint; extern crate rustc_middle; -use rustc_errors::{DiagnosticMessage, MultiSpan}; +use rustc_errors::{DiagMessage, MultiSpan}; use rustc_hir::hir_id::HirId; use rustc_lint::{Lint, LintContext}; use rustc_middle::ty::TyCtxt; -pub fn a(cx: impl LintContext, lint: &'static Lint, span: impl Into, msg: impl Into) { +pub fn a( + cx: impl LintContext, + lint: &'static Lint, + span: impl Into, + msg: impl Into) +{ cx.span_lint(lint, span, msg, |_| {}); } @@ -19,7 +24,7 @@ pub fn b( lint: &'static Lint, hir_id: HirId, span: impl Into, - msg: impl Into, + msg: impl Into, ) { tcx.node_span_lint(lint, hir_id, span, msg, |_| {}); }