about summary refs log tree commit diff
path: root/clippy_lints/src/utils
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-23 10:20:45 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-28 08:55:35 +1100
commit2a2b0b78eb4dd13bcd572f05c2a46ee435f3b68d (patch)
tree4abf05a79c18de90ff495c5b29f9d01d6ff37e20 /clippy_lints/src/utils
parent7be6e2178e89dad8b619742c566fdee948414acc (diff)
downloadrust-2a2b0b78eb4dd13bcd572f05c2a46ee435f3b68d.tar.gz
rust-2a2b0b78eb4dd13bcd572f05c2a46ee435f3b68d.zip
Rename `DiagnosticBuilder` as `Diag`.
Much better!

Note that this involves renaming (and updating the value of)
`DIAGNOSTIC_BUILDER` in clippy.
Diffstat (limited to 'clippy_lints/src/utils')
-rw-r--r--clippy_lints/src/utils/internal_lints/metadata_collector.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/utils/internal_lints/metadata_collector.rs b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
index 6fceb5656a6..97b509a84f9 100644
--- a/clippy_lints/src/utils/internal_lints/metadata_collector.rs
+++ b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
@@ -74,7 +74,7 @@ const LINT_EMISSION_FUNCTIONS: [&[&str]; 7] = [
     &["clippy_utils", "diagnostics", "span_lint_and_then"],
     &["clippy_utils", "diagnostics", "span_lint_hir_and_then"],
 ];
-const SUGGESTION_DIAGNOSTIC_BUILDER_METHODS: [(&str, bool); 9] = [
+const SUGGESTION_DIAG_METHODS: [(&str, bool); 9] = [
     ("span_suggestion", false),
     ("span_suggestion_short", false),
     ("span_suggestion_verbose", false),
@@ -1067,9 +1067,9 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for IsMultiSpanScanner<'a, 'hir> {
             },
             ExprKind::MethodCall(path, recv, _, _arg_span) => {
                 let (self_ty, _) = walk_ptrs_ty_depth(self.cx.typeck_results().expr_ty(recv));
-                if match_type(self.cx, self_ty, &paths::DIAGNOSTIC_BUILDER) {
+                if match_type(self.cx, self_ty, &paths::DIAG) {
                     let called_method = path.ident.name.as_str().to_string();
-                    for (method_name, is_multi_part) in &SUGGESTION_DIAGNOSTIC_BUILDER_METHODS {
+                    for (method_name, is_multi_part) in &SUGGESTION_DIAG_METHODS {
                         if *method_name == called_method {
                             if *is_multi_part {
                                 self.add_multi_part_suggestion();