Skip to content

Commit c6d23bd

Browse files
committed
code cleanup
1 parent a21a055 commit c6d23bd

File tree

1 file changed

+1
-2
lines changed
  • compiler/rustc_hir_typeck/src

1 file changed

+1
-2
lines changed

compiler/rustc_hir_typeck/src/cast.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
216216
// inference is more completely known.
217217
match cast_ty.kind() {
218218
ty::Dynamic(_, _, ty::Dyn) | ty::Slice(..) => {
219-
let reported = check.report_cast_to_unsized_type(fcx);
220-
return Err(reported);
219+
Err(check.report_cast_to_unsized_type(fcx))
221220
}
222221
_ => Ok(check),
223222
}

0 commit comments

Comments
 (0)