Update compiler/rustc_typeck/src/check/generator_interior/drop_ranges/record_consumed_borrow.rs
This commit is contained in:
parent
6d6be5fd8b
commit
bf21a81b15
@ -211,8 +211,10 @@ fn fake_read(
|
||||
"fake_read place_with_id={place_with_id:?}; cause={cause:?}; diag_expr_id={diag_expr_id:?}"
|
||||
);
|
||||
|
||||
// fake reads happen in places like the scrutinee of a match expression, so we can treat
|
||||
// these as a borrow.
|
||||
// fake reads happen in places like the scrutinee of a match expression.
|
||||
// we treat those as a borrow, much like a copy: the idea is that we are
|
||||
// transiently creating a `&T` ref that we can read from to observe the current
|
||||
// value (this `&T` is immediately dropped afterwards).
|
||||
self.borrow_place(place_with_id);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user