diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-04-28 22:56:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-28 22:56:47 +0200 |
| commit | 235d088412a98ed2cc55194c9268a8c6e17ed75e (patch) | |
| tree | 3aada61b1996f7127e083fb705e10e25cf5ce722 /compiler | |
| parent | afbb1881ab82c2eeba2c672cbe86a593b88564d6 (diff) | |
| parent | 754a62c306f1c758b12e9e337d6b0885fc8da223 (diff) | |
| download | rust-235d088412a98ed2cc55194c9268a8c6e17ed75e.tar.gz rust-235d088412a98ed2cc55194c9268a8c6e17ed75e.zip | |
Rollup merge of #110957 - WaffleLapkin:reach_generator_conflict_error, r=cjgillot
Fix an ICE in conflict error diagnostics Fixes #110929 r? ``@cjgillot``
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs index 5db0f72919d..ac84188a35f 100644 --- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs @@ -1359,7 +1359,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { } // Get closure's arguments - let ty::Closure(_, substs) = typeck_results.expr_ty(closure_expr).kind() else { unreachable!() }; + let ty::Closure(_, substs) = typeck_results.expr_ty(closure_expr).kind() else { /* hir::Closure can be a generator too */ return }; let sig = substs.as_closure().sig(); let tupled_params = tcx.erase_late_bound_regions(sig.inputs().iter().next().unwrap().map_bound(|&b| b)); |
