Skip to content

Commit 86ed311

Browse files
committed
Fix lint findings in librustdoc
1 parent e1da67e commit 86ed311

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/librustdoc/clean/auto_trait.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
634634
// that we don't end up with duplicate bounds (e.g., for<'b, 'b>)
635635
for_generics.extend(p.generic_params.clone());
636636
p.generic_params = for_generics.into_iter().collect();
637-
self.is_fn_ty(&tcx, &p.trait_)
637+
self.is_fn_ty(tcx, &p.trait_)
638638
}
639639
_ => false,
640640
};
@@ -681,7 +681,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
681681
} => {
682682
let mut new_trait_path = trait_path.clone();
683683

684-
if self.is_fn_ty(&tcx, trait_) && left_name == FN_OUTPUT_NAME {
684+
if self.is_fn_ty(tcx, trait_) && left_name == FN_OUTPUT_NAME {
685685
ty_to_fn
686686
.entry(*ty.clone())
687687
.and_modify(|e| *e = (e.0.clone(), Some(rhs.clone())))
@@ -850,7 +850,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
850850
vec.sort_by_cached_key(|x| format!("{:?}", x))
851851
}
852852

853-
fn is_fn_ty(&self, tcx: &TyCtxt<'_, '_, '_>, ty: &Type) -> bool {
853+
fn is_fn_ty(&self, tcx: TyCtxt<'_, '_, '_>, ty: &Type) -> bool {
854854
match &ty {
855855
&&Type::ResolvedPath { ref did, .. } => {
856856
*did == tcx.require_lang_item(lang_items::FnTraitLangItem)

src/librustdoc/clean/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4399,7 +4399,7 @@ where
43994399

44004400
// Start of code copied from rust-clippy
44014401

4402-
pub fn path_to_def_local(tcx: &TyCtxt<'_, '_, '_>, path: &[&str]) -> Option<DefId> {
4402+
pub fn path_to_def_local(tcx: TyCtxt<'_, '_, '_>, path: &[&str]) -> Option<DefId> {
44034403
let krate = tcx.hir().krate();
44044404
let mut items = krate.module.item_ids.clone();
44054405
let mut path_it = path.iter().peekable();
@@ -4424,7 +4424,7 @@ pub fn path_to_def_local(tcx: &TyCtxt<'_, '_, '_>, path: &[&str]) -> Option<DefI
44244424
}
44254425
}
44264426

4427-
pub fn path_to_def(tcx: &TyCtxt<'_, '_, '_>, path: &[&str]) -> Option<DefId> {
4427+
pub fn path_to_def(tcx: TyCtxt<'_, '_, '_>, path: &[&str]) -> Option<DefId> {
44284428
let crates = tcx.crates();
44294429

44304430
let krate = crates

src/librustdoc/core.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,9 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
466466
};
467467

468468
let send_trait = if crate_name == Some("core".to_string()) {
469-
clean::path_to_def_local(&tcx, &["marker", "Send"])
469+
clean::path_to_def_local(tcx, &["marker", "Send"])
470470
} else {
471-
clean::path_to_def(&tcx, &["core", "marker", "Send"])
471+
clean::path_to_def(tcx, &["core", "marker", "Send"])
472472
};
473473

474474
let mut renderinfo = RenderInfo::default();

0 commit comments

Comments
 (0)