mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Fix dogfood fallout
This commit is contained in:
parent
5eb7604482
commit
903add0c11
@ -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>,
|
||||
|
@ -93,7 +93,7 @@ impl EarlyLintPass for RawStrings {
|
||||
diag.span_suggestion(
|
||||
start,
|
||||
"use a string literal instead",
|
||||
format!("\"{}\"", str),
|
||||
format!("\"{str}\""),
|
||||
Applicability::MachineApplicable,
|
||||
);
|
||||
} else {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user