Skip to content

Commit e920ef8

Browse files
authored
Rollup merge of #86855 - LeSeulArtichaut:patch-1, r=davidtwco
Fix comments about unique borrows
2 parents ee86f96 + 88bcd8a commit e920ef8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_middle/src/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ pub enum BorrowKind {
651651
/// in an aliasable location. To solve, you'd have to translate with
652652
/// an `&mut` borrow:
653653
///
654-
/// struct Env { x: & &mut isize }
654+
/// struct Env { x: &mut &mut isize }
655655
/// let x: &mut isize = ...;
656656
/// let y = (&mut Env { &mut x }, fn_ptr); // changed from &x to &mut x
657657
/// fn fn_ptr(env: &mut Env) { **env.x += 5; }

compiler/rustc_middle/src/ty/closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ pub enum BorrowKind {
347347
/// an `&mut` borrow:
348348
///
349349
/// ```
350-
/// struct Env { x: & &mut isize }
350+
/// struct Env { x: &mut &mut isize }
351351
/// let x: &mut isize = ...;
352352
/// let y = (&mut Env { &mut x }, fn_ptr); // changed from &x to &mut x
353353
/// fn fn_ptr(env: &mut Env) { **env.x += 5; }

0 commit comments

Comments
 (0)