diff options
Diffstat (limited to 'compiler/rustc_hir_analysis/src/collect.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs index 7b5b049d254..60bd7e1bdc1 100644 --- a/compiler/rustc_hir_analysis/src/collect.rs +++ b/compiler/rustc_hir_analysis/src/collect.rs @@ -1090,7 +1090,7 @@ fn is_suggestable_infer_ty(ty: &hir::Ty<'_>) -> bool { pub fn get_infer_ret_ty<'hir>(output: &'hir hir::FnRetTy<'hir>) -> Option<&'hir hir::Ty<'hir>> { if let hir::FnRetTy::Return(ty) = output { if is_suggestable_infer_ty(ty) { - return Some(&*ty); + return Some(*ty); } } None @@ -1373,7 +1373,7 @@ fn impl_trait_ref( if let Some(ErrorGuaranteed { .. }) = check_impl_constness( tcx, tcx.is_const_trait_impl_raw(def_id.to_def_id()), - &ast_trait_ref, + ast_trait_ref, ) { // we have a const impl, but for a trait without `#[const_trait]`, so // without the host param. If we continue with the HIR trait ref, we get @@ -1394,7 +1394,7 @@ fn impl_trait_ref( let trait_ref = hir::TraitRef { path: &path, hir_ref_id: ast_trait_ref.hir_ref_id }; icx.astconv().instantiate_mono_trait_ref(&trait_ref, selfty) } else { - icx.astconv().instantiate_mono_trait_ref(&ast_trait_ref, selfty) + icx.astconv().instantiate_mono_trait_ref(ast_trait_ref, selfty) } }) .map(ty::EarlyBinder::bind) |
