Rename some region-specific stuff
This commit is contained in:
parent
30f38d69ab
commit
27a476839f
1 changed files with 2 additions and 2 deletions
|
@ -505,13 +505,13 @@ fn check_mut_from_ref<'tcx>(cx: &LateContext<'tcx>, sig: &FnSig<'_>, body: Optio
|
|||
if let FnRetTy::Return(ty) = sig.decl.output
|
||||
&& let Some((out, Mutability::Mut, _)) = get_ref_lm(ty)
|
||||
{
|
||||
let out_region = cx.tcx.named_region(out.hir_id);
|
||||
let out_region = cx.tcx.named_bound_var(out.hir_id);
|
||||
let args: Option<Vec<_>> = sig
|
||||
.decl
|
||||
.inputs
|
||||
.iter()
|
||||
.filter_map(get_ref_lm)
|
||||
.filter(|&(lt, _, _)| cx.tcx.named_region(lt.hir_id) == out_region)
|
||||
.filter(|&(lt, _, _)| cx.tcx.named_bound_var(lt.hir_id) == out_region)
|
||||
.map(|(_, mutability, span)| (mutability == Mutability::Not).then_some(span))
|
||||
.collect();
|
||||
if let Some(args) = args
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue