Skip to content

Commit 27a4768

Browse files
Rename some region-specific stuff
1 parent 30f38d6 commit 27a4768

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -505,13 +505,13 @@ fn check_mut_from_ref<'tcx>(cx: &LateContext<'tcx>, sig: &FnSig<'_>, body: Optio
505505
if let FnRetTy::Return(ty) = sig.decl.output
506506
&& let Some((out, Mutability::Mut, _)) = get_ref_lm(ty)
507507
{
508-
let out_region = cx.tcx.named_region(out.hir_id);
508+
let out_region = cx.tcx.named_bound_var(out.hir_id);
509509
let args: Option<Vec<_>> = sig
510510
.decl
511511
.inputs
512512
.iter()
513513
.filter_map(get_ref_lm)
514-
.filter(|&(lt, _, _)| cx.tcx.named_region(lt.hir_id) == out_region)
514+
.filter(|&(lt, _, _)| cx.tcx.named_bound_var(lt.hir_id) == out_region)
515515
.map(|(_, mutability, span)| (mutability == Mutability::Not).then_some(span))
516516
.collect();
517517
if let Some(args) = args

0 commit comments

Comments
 (0)