be even more precise about "cast" vs "coercion"
This commit is contained in:
@@ -652,7 +652,7 @@ fn codegen_stmt<'tcx>(
|
||||
lval.write_cvalue(fx, res);
|
||||
}
|
||||
Rvalue::Cast(
|
||||
CastKind::PointerCoercion(PointerCoercion::ReifyFnPointer),
|
||||
CastKind::PointerCoercion(PointerCoercion::ReifyFnPointer, _),
|
||||
ref operand,
|
||||
to_ty,
|
||||
) => {
|
||||
@@ -677,7 +677,7 @@ fn codegen_stmt<'tcx>(
|
||||
}
|
||||
}
|
||||
Rvalue::Cast(
|
||||
CastKind::PointerCoercion(PointerCoercion::UnsafeFnPointer),
|
||||
CastKind::PointerCoercion(PointerCoercion::UnsafeFnPointer, _),
|
||||
ref operand,
|
||||
to_ty,
|
||||
) => {
|
||||
@@ -688,6 +688,7 @@ fn codegen_stmt<'tcx>(
|
||||
Rvalue::Cast(
|
||||
CastKind::PointerCoercion(
|
||||
PointerCoercion::MutToConstPointer | PointerCoercion::ArrayToPointer,
|
||||
_,
|
||||
),
|
||||
..,
|
||||
) => {
|
||||
@@ -741,7 +742,7 @@ fn codegen_stmt<'tcx>(
|
||||
}
|
||||
}
|
||||
Rvalue::Cast(
|
||||
CastKind::PointerCoercion(PointerCoercion::ClosureFnPointer(_)),
|
||||
CastKind::PointerCoercion(PointerCoercion::ClosureFnPointer(_), _),
|
||||
ref operand,
|
||||
_to_ty,
|
||||
) => {
|
||||
@@ -763,7 +764,7 @@ fn codegen_stmt<'tcx>(
|
||||
}
|
||||
}
|
||||
Rvalue::Cast(
|
||||
CastKind::PointerCoercion(PointerCoercion::Unsize),
|
||||
CastKind::PointerCoercion(PointerCoercion::Unsize, _),
|
||||
ref operand,
|
||||
_to_ty,
|
||||
) => {
|
||||
@@ -771,7 +772,7 @@ fn codegen_stmt<'tcx>(
|
||||
crate::unsize::coerce_unsized_into(fx, operand, lval);
|
||||
}
|
||||
Rvalue::Cast(
|
||||
CastKind::PointerCoercion(PointerCoercion::DynStar),
|
||||
CastKind::PointerCoercion(PointerCoercion::DynStar, _),
|
||||
ref operand,
|
||||
_,
|
||||
) => {
|
||||
|
||||
Reference in New Issue
Block a user