From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../src/generator_interior/drop_ranges/record_consumed_borrow.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_hir_typeck/src/generator_interior/drop_ranges/record_consumed_borrow.rs') diff --git a/compiler/rustc_hir_typeck/src/generator_interior/drop_ranges/record_consumed_borrow.rs b/compiler/rustc_hir_typeck/src/generator_interior/drop_ranges/record_consumed_borrow.rs index bfe95852a..ed3d89031 100644 --- a/compiler/rustc_hir_typeck/src/generator_interior/drop_ranges/record_consumed_borrow.rs +++ b/compiler/rustc_hir_typeck/src/generator_interior/drop_ranges/record_consumed_borrow.rs @@ -116,7 +116,7 @@ impl<'tcx> ExprUseDelegate<'tcx> { // where the `identity(...)` (the rvalue) produces a return type // of `&'rv mut A`, where `'a: 'rv`. We then assign this result to // `'y`, resulting in (transitively) `'a: 'y` (i.e., while `y` is in use, - // `a` will be considered borrowed). Other parts of the code will ensure + // `a` will be considered borrowed). Other parts of the code will ensure // that if `y` is live over a yield, `&'y mut A` appears in the generator // state. If `'y` is live, then any sound region analysis must conclude // that `'a` is also live. So if this causes a bug, blame some other @@ -140,7 +140,7 @@ impl<'tcx> expr_use_visitor::Delegate<'tcx> for ExprUseDelegate<'tcx> { diag_expr_id: HirId, ) { let hir = self.tcx.hir(); - let parent = match hir.find_parent_node(place_with_id.hir_id) { + let parent = match hir.opt_parent_id(place_with_id.hir_id) { Some(parent) => parent, None => place_with_id.hir_id, }; -- cgit v1.2.3