Remove mir::CastKind::Misc
This commit is contained in:
parent
02cd79afb8
commit
d59c7ff000
25 changed files with 190 additions and 57 deletions
|
@ -553,7 +553,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
|
|||
unimplemented!()
|
||||
}
|
||||
|
||||
Rvalue::Cast(CastKind::Misc, _, _) => {}
|
||||
Rvalue::Cast(_, _, _) => {}
|
||||
|
||||
Rvalue::NullaryOp(NullOp::SizeOf | NullOp::AlignOf, _) => {}
|
||||
Rvalue::ShallowInitBox(_, _) => {}
|
||||
|
|
|
@ -557,7 +557,14 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
|
|||
}
|
||||
Rvalue::Cast(kind, operand, target_type) => {
|
||||
match kind {
|
||||
CastKind::Misc => {
|
||||
CastKind::DynStar => {
|
||||
// FIXME(dyn-star): make sure nothing needs to be done here.
|
||||
}
|
||||
// Nothing to check here
|
||||
CastKind::PointerFromExposedAddress
|
||||
| CastKind::PointerExposeAddress
|
||||
| CastKind::Pointer(_) => {}
|
||||
_ => {
|
||||
let op_ty = operand.ty(self.body, self.tcx);
|
||||
if op_ty.is_enum() {
|
||||
self.fail(
|
||||
|
@ -568,13 +575,6 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
|
|||
);
|
||||
}
|
||||
}
|
||||
CastKind::DynStar => {
|
||||
// FIXME(dyn-star): make sure nothing needs to be done here.
|
||||
}
|
||||
// Nothing to check here
|
||||
CastKind::PointerFromExposedAddress
|
||||
| CastKind::PointerExposeAddress
|
||||
| CastKind::Pointer(_) => {}
|
||||
}
|
||||
}
|
||||
Rvalue::Repeat(_, _)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue