Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Nov 3, 2022
1 parent a21a055 commit c6d23bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_hir_typeck/src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
// inference is more completely known.
match cast_ty.kind() {
ty::Dynamic(_, _, ty::Dyn) | ty::Slice(..) => {
let reported = check.report_cast_to_unsized_type(fcx);
return Err(reported);
Err(check.report_cast_to_unsized_type(fcx))
}
_ => Ok(check),
}
Expand Down

0 comments on commit c6d23bd

Please sign in to comment.