File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/rustc_typeck/src/check/generator_interior/drop_ranges Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -211,8 +211,10 @@ impl<'tcx> expr_use_visitor::Delegate<'tcx> for ExprUseDelegate<'tcx> {
211
211
"fake_read place_with_id={place_with_id:?}; cause={cause:?}; diag_expr_id={diag_expr_id:?}"
212
212
) ;
213
213
214
- // fake reads happen in places like the scrutinee of a match expression, so we can treat
215
- // these as a borrow.
214
+ // fake reads happen in places like the scrutinee of a match expression.
215
+ // we treat those as a borrow, much like a copy: the idea is that we are
216
+ // transiently creating a `&T` ref that we can read from to observe the current
217
+ // value (this `&T` is immediately dropped afterwards).
216
218
self . borrow_place ( place_with_id) ;
217
219
}
218
220
}
You can’t perform that action at this time.
0 commit comments