diff options
| author | yukang <moorekang@gmail.com> | 2022-11-03 09:42:34 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2022-11-03 09:42:34 +0800 |
| commit | c6d23bdd328decdb0a0e98980af4c3b7aa13d9d6 (patch) | |
| tree | 9cc41e2d209366066fffce633cf684cdc45b606f | |
| parent | a21a055ca6f0d0244cfe79ffba908987e475c946 (diff) | |
| download | rust-c6d23bdd328decdb0a0e98980af4c3b7aa13d9d6.tar.gz rust-c6d23bdd328decdb0a0e98980af4c3b7aa13d9d6.zip | |
code cleanup
| -rw-r--r-- | compiler/rustc_hir_typeck/src/cast.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_hir_typeck/src/cast.rs b/compiler/rustc_hir_typeck/src/cast.rs index cf7587ffa0e..4ff89511938 100644 --- a/compiler/rustc_hir_typeck/src/cast.rs +++ b/compiler/rustc_hir_typeck/src/cast.rs @@ -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), } |
