unify dyn* coercions with other pointer coercions
This commit is contained in:
parent
67bb749c2e
commit
46ecb23198
23 changed files with 70 additions and 55 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue