summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2023-09-25 10:31:51 +0200
committerPhilipp Krones <hello@philkrones.com>2023-09-25 10:31:51 +0200
commit903add0c11a0205314bf49fff6851fea3478449c (patch)
tree63aeecd8f298172063110a94970a06662f28f64c
parent5eb7604482f8f3264605c0e440861223576d6faf (diff)
downloadrust-903add0c11a0205314bf49fff6851fea3478449c.tar.gz
rust-903add0c11a0205314bf49fff6851fea3478449c.zip
Fix dogfood fallout
-rw-r--r--clippy_lints/src/doc.rs3
-rw-r--r--clippy_lints/src/raw_strings.rs2
-rw-r--r--clippy_utils/src/ty/type_certainty/mod.rs2
3 files changed, 4 insertions, 3 deletions
diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs
index bf2add6aa64..e789e0da679 100644
--- a/clippy_lints/src/doc.rs
+++ b/clippy_lints/src/doc.rs
@@ -459,7 +459,7 @@ struct Fragments<'a> {
 
 impl Fragments<'_> {
     fn span(self, cx: &LateContext<'_>, range: Range<usize>) -> Option<Span> {
-        source_span_for_markdown_range(cx.tcx, &self.doc, &range, &self.fragments)
+        source_span_for_markdown_range(cx.tcx, self.doc, &range, self.fragments)
     }
 }
 
@@ -513,6 +513,7 @@ fn check_attrs(cx: &LateContext<'_>, valid_idents: &FxHashSet<String>, attrs: &[
 
 const RUST_CODE: &[&str] = &["rust", "no_run", "should_panic", "compile_fail"];
 
+#[allow(clippy::too_many_lines)] // Only a big match statement
 fn check_doc<'a, Events: Iterator<Item = (pulldown_cmark::Event<'a>, Range<usize>)>>(
     cx: &LateContext<'_>,
     valid_idents: &FxHashSet<String>,
diff --git a/clippy_lints/src/raw_strings.rs b/clippy_lints/src/raw_strings.rs
index ba80e37d37e..2895595e039 100644
--- a/clippy_lints/src/raw_strings.rs
+++ b/clippy_lints/src/raw_strings.rs
@@ -93,7 +93,7 @@ impl EarlyLintPass for RawStrings {
                             diag.span_suggestion(
                                 start,
                                 "use a string literal instead",
-                                format!("\"{}\"", str),
+                                format!("\"{str}\""),
                                 Applicability::MachineApplicable,
                             );
                         } else {
diff --git a/clippy_utils/src/ty/type_certainty/mod.rs b/clippy_utils/src/ty/type_certainty/mod.rs
index 713158c3a55..d05d9e7640f 100644
--- a/clippy_utils/src/ty/type_certainty/mod.rs
+++ b/clippy_utils/src/ty/type_certainty/mod.rs
@@ -207,7 +207,7 @@ fn path_segment_certainty(
             // Checking `res_generics_def_id(..)` before calling `generics_of` avoids an ICE.
             if cx.tcx.res_generics_def_id(path_segment.res).is_some() {
                 let generics = cx.tcx.generics_of(def_id);
-                let count = generics.params.len() - generics.host_effect_index.is_some() as usize;
+                let count = generics.params.len() - usize::from(generics.host_effect_index.is_some());
                 let lhs = if (parent_certainty.is_certain() || generics.parent_count == 0) && count == 0 {
                     Certainty::Certain(None)
                 } else {