diff options
| author | Michael Goulet <michael@errs.io> | 2023-02-06 18:38:52 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-02-16 03:39:59 +0000 |
| commit | 27a476839f9fbedbecddf2f42bf40a94c4558ef1 (patch) | |
| tree | cf9df61a7d56005dd1204ac48dc14656a4c13525 | |
| parent | 30f38d69ab65036910c7e73c13771bab30afbae1 (diff) | |
| download | rust-27a476839f9fbedbecddf2f42bf40a94c4558ef1.tar.gz rust-27a476839f9fbedbecddf2f42bf40a94c4558ef1.zip | |
Rename some region-specific stuff
| -rw-r--r-- | clippy_lints/src/ptr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/ptr.rs b/clippy_lints/src/ptr.rs index d88409c356e..fc550936165 100644 --- a/clippy_lints/src/ptr.rs +++ b/clippy_lints/src/ptr.rs @@ -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 |
