1 // Check that `ref mut` variables don't change address between the match guard
2 // and the arm expression.
6 // Test that z always point to the same temporary.
7 fn referent_stability() {
10 ref mut z if { p = z as *const _; true } => assert_eq!(p, z as *const _),
15 // Test that z is always effectively the same variable.
16 fn variable_stability() {
19 ref mut z if { p = &z as *const _; true } => assert_eq!(p, &z as *const _),
24 // Test that a borrow of *z can cross from the guard to the arm.
28 ref mut z if { r = z as &_; true } => assert_eq!(*r, 0),