Skip to content

Commit fadf03e

Browse files
committed
Fix typos
1 parent ffd5327 commit fadf03e

File tree

2 files changed

+4
-2
lines changed
  • compiler

2 files changed

+4
-2
lines changed

Diff for: compiler/rustc_middle/src/ty/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,8 @@ pub struct CapturedPlace<'tcx> {
675675
}
676676

677677
impl CapturedPlace<'tcx> {
678+
/// Returns the hir-id of the root variable for the captured place.
679+
/// e.g., if `a.b.c` was captured, would return the hir-id for `a`.
678680
pub fn get_root_variable(&self) -> hir::HirId {
679681
match self.place.base {
680682
HirPlaceBase::Upvar(upvar_id) => upvar_id.var_path.hir_id,

Diff for: compiler/rustc_mir/src/borrow_check/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1358,10 +1358,10 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
13581358

13591359
fn propagate_closure_used_mut_upvar(&mut self, operand: &Operand<'tcx>) {
13601360
let propagate_closure_used_mut_place = |this: &mut Self, place: Place<'tcx>| {
1361-
// We have three possiblities here:
1361+
// We have three possibilities here:
13621362
// a. We are modifying something through a mut-ref
13631363
// b. We are modifying something that is local to our parent
1364-
// c. Current body is a nested clsoure, and we are modifying path starting from
1364+
// c. Current body is a nested closure, and we are modifying path starting from
13651365
// a Place captured by our parent closure.
13661366

13671367
// Handle (c), the path being modified is exactly the path captured by our parent

0 commit comments

Comments
 (0)