We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a21a055 commit c6d23bdCopy full SHA for c6d23bd
compiler/rustc_hir_typeck/src/cast.rs
@@ -216,8 +216,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
216
// inference is more completely known.
217
match cast_ty.kind() {
218
ty::Dynamic(_, _, ty::Dyn) | ty::Slice(..) => {
219
- let reported = check.report_cast_to_unsized_type(fcx);
220
- return Err(reported);
+ Err(check.report_cast_to_unsized_type(fcx))
221
}
222
_ => Ok(check),
223
0 commit comments