Skip to content

Commit

Permalink
Rename DiagnosticExt as DiagExt.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Mar 5, 2024
1 parent dc37ddd commit ec920ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/inline_fn_without_body.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/new_without_default.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions clippy_utils/src/sugg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ fn indentation<T: LintContext>(cx: &T, span: Span) -> Option<String> {
}

/// Convenience extension trait for `Diag`.
pub trait DiagnosticExt<T: LintContext> {
pub trait DiagExt<T: LintContext> {
/// Suggests to add an attribute to an item.
///
/// Correctly handles indentation of the attribute and item.
Expand Down Expand Up @@ -732,7 +732,7 @@ pub trait DiagnosticExt<T: LintContext> {
fn suggest_remove_item(&mut self, cx: &T, item: Span, msg: &str, applicability: Applicability);
}

impl<T: LintContext> DiagnosticExt<T> for rustc_errors::Diag<'_, ()> {
impl<T: LintContext> DiagExt<T> for rustc_errors::Diag<'_, ()> {
fn suggest_item_with_attr<D: Display + ?Sized>(
&mut self,
cx: &T,
Expand Down

0 comments on commit ec920ce

Please sign in to comment.