be even more precise about "cast" vs "coercion"
This commit is contained in:
parent
1efad22339
commit
25b66d8091
1 changed files with 6 additions and 5 deletions
11
src/base.rs
11
src/base.rs
|
@ -652,7 +652,7 @@ fn codegen_stmt<'tcx>(
|
||||||
lval.write_cvalue(fx, res);
|
lval.write_cvalue(fx, res);
|
||||||
}
|
}
|
||||||
Rvalue::Cast(
|
Rvalue::Cast(
|
||||||
CastKind::PointerCoercion(PointerCoercion::ReifyFnPointer),
|
CastKind::PointerCoercion(PointerCoercion::ReifyFnPointer, _),
|
||||||
ref operand,
|
ref operand,
|
||||||
to_ty,
|
to_ty,
|
||||||
) => {
|
) => {
|
||||||
|
@ -677,7 +677,7 @@ fn codegen_stmt<'tcx>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rvalue::Cast(
|
Rvalue::Cast(
|
||||||
CastKind::PointerCoercion(PointerCoercion::UnsafeFnPointer),
|
CastKind::PointerCoercion(PointerCoercion::UnsafeFnPointer, _),
|
||||||
ref operand,
|
ref operand,
|
||||||
to_ty,
|
to_ty,
|
||||||
) => {
|
) => {
|
||||||
|
@ -688,6 +688,7 @@ fn codegen_stmt<'tcx>(
|
||||||
Rvalue::Cast(
|
Rvalue::Cast(
|
||||||
CastKind::PointerCoercion(
|
CastKind::PointerCoercion(
|
||||||
PointerCoercion::MutToConstPointer | PointerCoercion::ArrayToPointer,
|
PointerCoercion::MutToConstPointer | PointerCoercion::ArrayToPointer,
|
||||||
|
_,
|
||||||
),
|
),
|
||||||
..,
|
..,
|
||||||
) => {
|
) => {
|
||||||
|
@ -741,7 +742,7 @@ fn codegen_stmt<'tcx>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rvalue::Cast(
|
Rvalue::Cast(
|
||||||
CastKind::PointerCoercion(PointerCoercion::ClosureFnPointer(_)),
|
CastKind::PointerCoercion(PointerCoercion::ClosureFnPointer(_), _),
|
||||||
ref operand,
|
ref operand,
|
||||||
_to_ty,
|
_to_ty,
|
||||||
) => {
|
) => {
|
||||||
|
@ -763,7 +764,7 @@ fn codegen_stmt<'tcx>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rvalue::Cast(
|
Rvalue::Cast(
|
||||||
CastKind::PointerCoercion(PointerCoercion::Unsize),
|
CastKind::PointerCoercion(PointerCoercion::Unsize, _),
|
||||||
ref operand,
|
ref operand,
|
||||||
_to_ty,
|
_to_ty,
|
||||||
) => {
|
) => {
|
||||||
|
@ -771,7 +772,7 @@ fn codegen_stmt<'tcx>(
|
||||||
crate::unsize::coerce_unsized_into(fx, operand, lval);
|
crate::unsize::coerce_unsized_into(fx, operand, lval);
|
||||||
}
|
}
|
||||||
Rvalue::Cast(
|
Rvalue::Cast(
|
||||||
CastKind::PointerCoercion(PointerCoercion::DynStar),
|
CastKind::PointerCoercion(PointerCoercion::DynStar, _),
|
||||||
ref operand,
|
ref operand,
|
||||||
_,
|
_,
|
||||||
) => {
|
) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue