Skip to content

Commit 903add0

Browse files
committed
Fix dogfood fallout
1 parent 5eb7604 commit 903add0

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

clippy_lints/src/doc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ struct Fragments<'a> {
459459

460460
impl Fragments<'_> {
461461
fn span(self, cx: &LateContext<'_>, range: Range<usize>) -> Option<Span> {
462-
source_span_for_markdown_range(cx.tcx, &self.doc, &range, &self.fragments)
462+
source_span_for_markdown_range(cx.tcx, self.doc, &range, self.fragments)
463463
}
464464
}
465465

@@ -513,6 +513,7 @@ fn check_attrs(cx: &LateContext<'_>, valid_idents: &FxHashSet<String>, attrs: &[
513513

514514
const RUST_CODE: &[&str] = &["rust", "no_run", "should_panic", "compile_fail"];
515515

516+
#[allow(clippy::too_many_lines)] // Only a big match statement
516517
fn check_doc<'a, Events: Iterator<Item = (pulldown_cmark::Event<'a>, Range<usize>)>>(
517518
cx: &LateContext<'_>,
518519
valid_idents: &FxHashSet<String>,

clippy_lints/src/raw_strings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl EarlyLintPass for RawStrings {
9393
diag.span_suggestion(
9494
start,
9595
"use a string literal instead",
96-
format!("\"{}\"", str),
96+
format!("\"{str}\""),
9797
Applicability::MachineApplicable,
9898
);
9999
} else {

clippy_utils/src/ty/type_certainty/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ fn path_segment_certainty(
207207
// Checking `res_generics_def_id(..)` before calling `generics_of` avoids an ICE.
208208
if cx.tcx.res_generics_def_id(path_segment.res).is_some() {
209209
let generics = cx.tcx.generics_of(def_id);
210-
let count = generics.params.len() - generics.host_effect_index.is_some() as usize;
210+
let count = generics.params.len() - usize::from(generics.host_effect_index.is_some());
211211
let lhs = if (parent_certainty.is_certain() || generics.parent_count == 0) && count == 0 {
212212
Certainty::Certain(None)
213213
} else {

0 commit comments

Comments
 (0)