diff options
| author | Lukas Markeffsky <@> | 2024-09-15 16:47:42 +0200 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2024-09-24 22:17:55 +0200 |
| commit | 46ecb23198fa83136a266cb5a18675d2d342ab18 (patch) | |
| tree | 7708e1bcb9a223316a7fe8535ed0702c95214778 /compiler/rustc_monomorphize/src | |
| parent | 67bb749c2e1cf503fee64842963dd3e72a417a3f (diff) | |
| download | rust-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.rs | 6 |
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 |
