diff options
Diffstat (limited to 'compiler/rustc_middle/src/mir/syntax.rs')
| -rw-r--r-- | compiler/rustc_middle/src/mir/syntax.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index c50a30cf7f3..92eefd89848 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -284,15 +284,15 @@ pub enum FakeBorrowKind { /// /// This is used when lowering deref patterns, where shallow borrows wouldn't prevent something /// like: - // ```compile_fail - // let mut b = Box::new(false); - // match b { - // deref!(true) => {} // not reached because `*b == false` - // _ if { *b = true; false } => {} // not reached because the guard is `false` - // deref!(false) => {} // not reached because the guard changed it - // // UB because we reached the unreachable. - // } - // ``` + /// ```compile_fail + /// let mut b = Box::new(false); + /// match b { + /// deref!(true) => {} // not reached because `*b == false` + /// _ if { *b = true; false } => {} // not reached because the guard is `false` + /// deref!(false) => {} // not reached because the guard changed it + /// // UB because we reached the unreachable. + /// } + /// ``` Deep, } |
