diff options
| author | Michael Goulet <michael@errs.io> | 2024-08-25 16:02:11 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-08-25 16:02:29 -0400 |
| commit | 48f43fa0ed2f2e4ff2d9d53b9d72cfbc108a9034 (patch) | |
| tree | 26b26bdc8f2c75b6343e3194409a7c9a16e64cb4 /compiler/rustc_monomorphize/src | |
| parent | 89103466d77a3ae068bab0fd17c53bf7104f627b (diff) | |
| download | rust-48f43fa0ed2f2e4ff2d9d53b9d72cfbc108a9034.tar.gz rust-48f43fa0ed2f2e4ff2d9d53b9d72cfbc108a9034.zip | |
Avoid taking reference of &TyKind
Diffstat (limited to 'compiler/rustc_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 77f6a1e17ce..ff4207fbefd 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -1035,9 +1035,9 @@ fn find_vtable_types_for_unsizing<'tcx>( } }; - match (&source_ty.kind(), &target_ty.kind()) { + match (source_ty.kind(), target_ty.kind()) { (&ty::Ref(_, a, _), &ty::Ref(_, b, _) | &ty::RawPtr(b, _)) - | (&ty::RawPtr(a, _), &ty::RawPtr(b, _)) => ptr_vtable(*a, *b), + | (&ty::RawPtr(a, _), &ty::RawPtr(b, _)) => ptr_vtable(a, b), (&ty::Adt(def_a, _), &ty::Adt(def_b, _)) if def_a.is_box() && def_b.is_box() => { ptr_vtable(source_ty.boxed_ty(), target_ty.boxed_ty()) } |
