Skip to content

Commit

Permalink
Fix dogfood fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Sep 25, 2023
1 parent 5eb7604 commit 903add0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion clippy_lints/src/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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>,
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/raw_strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl EarlyLintPass for RawStrings {
diag.span_suggestion(
start,
"use a string literal instead",
format!("\"{}\"", str),
format!("\"{str}\""),
Applicability::MachineApplicable,
);
} else {
Expand Down
2 changes: 1 addition & 1 deletion clippy_utils/src/ty/type_certainty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 903add0

Please sign in to comment.