Update compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Co-authored-by: lcnr <rust@lcnr.de>
This commit is contained in:
parent
c7272a6cbc
commit
a8b0eb7c65
1 changed files with 2 additions and 1 deletions
|
@ -198,7 +198,8 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
|
|||
|
||||
/// Returns `true` if a closure is inferred to be an `FnMut` closure.
|
||||
fn is_closure_fn_mut(&self, fr: RegionVid) -> bool {
|
||||
if let Some(ty::ReLateParam(late_param)) = self.to_error_region(fr).map(|r| r.kind())
|
||||
if let Some(r) = self.to_error_region(fr)
|
||||
&& let ty::ReLateParam(late_param) = r.kind()
|
||||
&& let ty::LateParamRegionKind::ClosureEnv = late_param.kind
|
||||
&& let DefiningTy::Closure(_, args) = self.regioncx.universal_regions().defining_ty
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue