diff options
Diffstat (limited to 'compiler/rustc_hir_analysis/src/coherence/orphan.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/coherence/orphan.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/coherence/orphan.rs b/compiler/rustc_hir_analysis/src/coherence/orphan.rs index b46a67d08eb..ca8a635ab5e 100644 --- a/compiler/rustc_hir_analysis/src/coherence/orphan.rs +++ b/compiler/rustc_hir_analysis/src/coherence/orphan.rs @@ -323,7 +323,7 @@ fn emit_orphan_check_error<'tcx>( let is_foreign = !trait_ref.def_id.is_local() && matches!(is_target_ty, IsFirstInputType::No); - match &ty.kind() { + match *ty.kind() { ty::Slice(_) => { push_to_foreign_or_name( is_foreign, @@ -354,14 +354,14 @@ fn emit_orphan_check_error<'tcx>( ty::Alias(ty::Opaque, ..) => { opaque.push(errors::OnlyCurrentTraitsOpaque { span }) } - ty::RawPtr(ptr_ty) => { + ty::RawPtr(ptr_ty, mutbl) => { if !self_ty.has_param() { - let mut_key = ptr_ty.mutbl.prefix_str(); + let mut_key = mutbl.prefix_str(); sugg = Some(errors::OnlyCurrentTraitsPointerSugg { wrapper_span: self_ty_span, struct_span: full_impl_span.shrink_to_lo(), mut_key, - ptr_ty: ptr_ty.ty, + ptr_ty, }); } pointer.push(errors::OnlyCurrentTraitsPointer { span, pointer: ty }); |
