about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src
diff options
context:
space:
mode:
authorLukas Markeffsky <@>2024-09-15 16:47:42 +0200
committerLukas Markeffsky <@>2024-09-24 22:17:55 +0200
commit46ecb23198fa83136a266cb5a18675d2d342ab18 (patch)
tree7708e1bcb9a223316a7fe8535ed0702c95214778 /compiler/rustc_monomorphize/src
parent67bb749c2e1cf503fee64842963dd3e72a417a3f (diff)
downloadrust-46ecb23198fa83136a266cb5a18675d2d342ab18.tar.gz
rust-46ecb23198fa83136a266cb5a18675d2d342ab18.zip
unify dyn* coercions with other pointer coercions
Diffstat (limited to 'compiler/rustc_monomorphize/src')
-rw-r--r--compiler/rustc_monomorphize/src/collector.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs
index 8d137b8d8f9..986d0030a24 100644
--- a/compiler/rustc_monomorphize/src/collector.rs
+++ b/compiler/rustc_monomorphize/src/collector.rs
@@ -665,11 +665,11 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
             // have to instantiate all methods of the trait being cast to, so we
             // can build the appropriate vtable.
             mir::Rvalue::Cast(
-                mir::CastKind::PointerCoercion(PointerCoercion::Unsize),
+                mir::CastKind::PointerCoercion(PointerCoercion::Unsize)
+                | mir::CastKind::PointerCoercion(PointerCoercion::DynStar),
                 ref operand,
                 target_ty,
-            )
-            | mir::Rvalue::Cast(mir::CastKind::DynStar, ref operand, target_ty) => {
+            ) => {
                 let source_ty = operand.ty(self.body, self.tcx);
                 // *Before* monomorphizing, record that we already handled this mention.
                 self.used_mentioned_items