1
Fork 0

code cleanup

This commit is contained in:
yukang 2022-11-03 09:42:34 +08:00
parent a21a055ca6
commit c6d23bdd32

View file

@ -216,8 +216,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
// inference is more completely known. // inference is more completely known.
match cast_ty.kind() { match cast_ty.kind() {
ty::Dynamic(_, _, ty::Dyn) | ty::Slice(..) => { ty::Dynamic(_, _, ty::Dyn) | ty::Slice(..) => {
let reported = check.report_cast_to_unsized_type(fcx); Err(check.report_cast_to_unsized_type(fcx))
return Err(reported);
} }
_ => Ok(check), _ => Ok(check),
} }