mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Rename DiagnosticExt
as DiagExt
.
This commit is contained in:
parent
d0e9bab51b
commit
d98ad0a181
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user