Skip to content

Commit 4fb6c6e

Browse files
committed
fix lint in rustdoc
1 parent 05f69cf commit 4fb6c6e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/librustdoc/clean/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1388,14 +1388,14 @@ pub(crate) fn clean_middle_assoc_item<'tcx>(
13881388
&& let Some(GenericParamDef {
13891389
kind: GenericParamDefKind::Type { bounds: param_bounds, .. },
13901390
..
1391-
}) = generics.params.iter_mut().find(|param| &param.name == arg)
1391+
}) = generics.params.iter_mut().find(|param| param.name == *arg)
13921392
{
13931393
param_bounds.append(bounds);
13941394
} else if let WherePredicate::RegionPredicate { lifetime: Lifetime(arg), bounds } = &mut pred
13951395
&& let Some(GenericParamDef {
13961396
kind: GenericParamDefKind::Lifetime { outlives: param_bounds },
13971397
..
1398-
}) = generics.params.iter_mut().find(|param| &param.name == arg) {
1398+
}) = generics.params.iter_mut().find(|param| param.name == *arg) {
13991399
param_bounds.extend(bounds.drain(..).map(|bound| match bound {
14001400
GenericBound::Outlives(lifetime) => lifetime,
14011401
_ => unreachable!(),

src/librustdoc/clean/types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1483,12 +1483,12 @@ impl Type {
14831483
(Type::Slice(a), Type::Slice(b)) => a.is_same(b, cache),
14841484
(Type::Array(a, al), Type::Array(b, bl)) => al == bl && a.is_same(b, cache),
14851485
(Type::RawPointer(mutability, type_), Type::RawPointer(b_mutability, b_type_)) => {
1486-
mutability == b_mutability && type_.is_same(b_type_, cache)
1486+
*mutability == *b_mutability && type_.is_same(b_type_, cache)
14871487
}
14881488
(
14891489
Type::BorrowedRef { mutability, type_, .. },
14901490
Type::BorrowedRef { mutability: b_mutability, type_: b_type_, .. },
1491-
) => mutability == b_mutability && type_.is_same(b_type_, cache),
1491+
) => *mutability == *b_mutability && type_.is_same(b_type_, cache),
14921492
// Placeholders and generics are equal to all other types.
14931493
(Type::Infer, _) | (_, Type::Infer) => true,
14941494
(Type::Generic(_), _) | (_, Type::Generic(_)) => true,

src/librustdoc/html/format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ pub(crate) fn href_relative_parts<'fqp>(
744744
) -> Box<dyn Iterator<Item = Symbol> + 'fqp> {
745745
for (i, (f, r)) in fqp.iter().zip(relative_to_fqp.iter()).enumerate() {
746746
// e.g. linking to std::iter from std::vec (`dissimilar_part_count` will be 1)
747-
if f != r {
747+
if *f != *r {
748748
let dissimilar_part_count = relative_to_fqp.len() - i;
749749
let fqp_module = &fqp[i..fqp.len()];
750750
return Box::new(

src/librustdoc/html/render/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl<'tcx> Context<'tcx> {
228228
} else {
229229
if let Some(&(ref names, ty)) = self.cache().paths.get(&it.item_id.expect_def_id()) {
230230
if self.current.len() + 1 != names.len()
231-
|| self.current.iter().zip(names.iter()).any(|(a, b)| a != b)
231+
|| self.current.iter().zip(names.iter()).any(|(a, b)| *a != *b)
232232
{
233233
// We checked that the redirection isn't pointing to the current file,
234234
// preventing an infinite redirection loop in the generated

0 commit comments

Comments
 (0)