Skip to content

Commit 43c994a

Browse files
committed
Fix nightly build
1 parent 2f152ac commit 43c994a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/monomorphize_collector.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,11 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
514514
// have to instantiate all methods of the trait being cast to, so we
515515
// can build the appropriate vtable.
516516
mir::Rvalue::Cast(
517-
mir::CastKind::PointerCoercion(PointerCoercion::Unsize),
517+
mir::CastKind::PointerCoercion(PointerCoercion::Unsize, _)
518+
| mir::CastKind::PointerCoercion(PointerCoercion::DynStar, _),
518519
ref operand,
519520
target_ty,
520-
)
521-
| mir::Rvalue::Cast(mir::CastKind::DynStar, ref operand, target_ty) => {
521+
) => {
522522
let target_ty = self.monomorphize(target_ty);
523523
let source_ty = operand.ty(self.body, self.tcx);
524524
let source_ty = self.monomorphize(source_ty);
@@ -544,7 +544,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
544544
}
545545
}
546546
mir::Rvalue::Cast(
547-
mir::CastKind::PointerCoercion(PointerCoercion::ReifyFnPointer),
547+
mir::CastKind::PointerCoercion(PointerCoercion::ReifyFnPointer, _),
548548
ref operand,
549549
_,
550550
) => {
@@ -553,7 +553,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
553553
visit_fn_use(self.tcx, fn_ty, false, span, &mut self.output);
554554
}
555555
mir::Rvalue::Cast(
556-
mir::CastKind::PointerCoercion(PointerCoercion::ClosureFnPointer(_)),
556+
mir::CastKind::PointerCoercion(PointerCoercion::ClosureFnPointer(_), _),
557557
ref operand,
558558
_,
559559
) => {

src/preempt_count/check.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
129129

130130
match *rvalue {
131131
mir::Rvalue::Cast(
132-
mir::CastKind::PointerCoercion(PointerCoercion::Unsize),
132+
mir::CastKind::PointerCoercion(PointerCoercion::Unsize, _)
133+
| mir::CastKind::PointerCoercion(PointerCoercion::DynStar, _),
133134
ref operand,
134135
target_ty,
135-
)
136-
| mir::Rvalue::Cast(mir::CastKind::DynStar, ref operand, target_ty) => {
136+
) => {
137137
let target_ty = self.monomorphize(target_ty);
138138
let source_ty = operand.ty(self.body, self.cx.tcx);
139139
let source_ty = self.monomorphize(source_ty);
@@ -155,7 +155,7 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
155155
}
156156
}
157157
mir::Rvalue::Cast(
158-
mir::CastKind::PointerCoercion(PointerCoercion::ReifyFnPointer),
158+
mir::CastKind::PointerCoercion(PointerCoercion::ReifyFnPointer, _),
159159
ref operand,
160160
_,
161161
) => {
@@ -170,7 +170,7 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
170170
}
171171
}
172172
mir::Rvalue::Cast(
173-
mir::CastKind::PointerCoercion(PointerCoercion::ClosureFnPointer(_)),
173+
mir::CastKind::PointerCoercion(PointerCoercion::ClosureFnPointer(_), _),
174174
ref operand,
175175
_,
176176
) => {

0 commit comments

Comments
 (0)