diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2021-11-09 18:30:24 -0800 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2021-11-09 20:06:33 -0800 |
| commit | c615b11aa7a4e41a7b11c9bfb3a4fe101c4f973f (patch) | |
| tree | 06846bd76de21fdbca2809b18e97cba2122c3f4d | |
| parent | cf6a73c1a4a363a1239f2db32b89ff3d2affb6c2 (diff) | |
| download | rust-c615b11aa7a4e41a7b11c9bfb3a4fe101c4f973f.tar.gz rust-c615b11aa7a4e41a7b11c9bfb3a4fe101c4f973f.zip | |
Remove unnecessary reborrows
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 9238a0bc3f3..4e1fd4f1136 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -109,7 +109,10 @@ impl Clean<GenericBound> for hir::GenericBound<'_> { }; GenericBound::TraitBound( - PolyTrait { trait_: (trait_ref, &*bindings).clean(cx), generic_params: vec![] }, + PolyTrait { + trait_: (trait_ref, &bindings[..]).clean(cx), + generic_params: vec![], + }, hir::TraitBoundModifier::None, ) } @@ -764,7 +767,7 @@ impl<'a> Clean<Function> for (&'a hir::FnSig<'a>, &'a hir::Generics<'a>, hir::Bo let (generics, decl) = enter_impl_trait(cx, |cx| { let generics = self.1.clean(cx); let args = (self.0.decl.inputs, self.2).clean(cx); - let decl = clean_fn_decl_with_args(cx, &*self.0.decl, args); + let decl = clean_fn_decl_with_args(cx, self.0.decl, args); (generics, decl) }); Function { decl, generics, header: self.0.header } |
