@@ -506,25 +506,25 @@ pub enum BorrowKind {
506506 /// implicit closure bindings. It is needed when the closure is
507507 /// borrowing or mutating a mutable referent, e.g.:
508508 ///
509- /// let x: &mut isize = ...;
510- /// let y = || *x += 5;
509+ /// let x: &mut isize = ...;
510+ /// let y = || *x += 5;
511511 ///
512512 /// If we were to try to translate this closure into a more explicit
513513 /// form, we'd encounter an error with the code as written:
514514 ///
515- /// struct Env { x: & &mut isize }
516- /// let x: &mut isize = ...;
517- /// let y = (&mut Env { &x }, fn_ptr); // Closure is pair of env and fn
518- /// fn fn_ptr(env: &mut Env) { **env.x += 5; }
515+ /// struct Env { x: & &mut isize }
516+ /// let x: &mut isize = ...;
517+ /// let y = (&mut Env { &x }, fn_ptr); // Closure is pair of env and fn
518+ /// fn fn_ptr(env: &mut Env) { **env.x += 5; }
519519 ///
520520 /// This is then illegal because you cannot mutate an `&mut` found
521521 /// in an aliasable location. To solve, you'd have to translate with
522522 /// an `&mut` borrow:
523523 ///
524- /// struct Env { x: & &mut isize }
525- /// let x: &mut isize = ...;
526- /// let y = (&mut Env { &mut x }, fn_ptr); // changed from &x to &mut x
527- /// fn fn_ptr(env: &mut Env) { **env.x += 5; }
524+ /// struct Env { x: & &mut isize }
525+ /// let x: &mut isize = ...;
526+ /// let y = (&mut Env { &mut x }, fn_ptr); // changed from &x to &mut x
527+ /// fn fn_ptr(env: &mut Env) { **env.x += 5; }
528528 ///
529529 /// Now the assignment to `**env.x` is legal, but creating a
530530 /// mutable pointer to `x` is not because `x` is not mutable. We
0 commit comments