fn foo() {
    match true {
        true => {
            // Original borrow ends at end of match arm
            let mut x = 1;
            let y = &x;
            //~^ immutable borrow occurs here
            let z = &mut x; //~ ERROR cannot borrow
            //~^ mutable borrow occurs here
        }
     //~^ NOTE immutable borrow ends here
        false => ()
    }
}
//~^ NOTE mutable borrow ends here
~^ NOTE mutable borrow ends here
~^ NOTE mutable borrow ends here
fn foo() {
    match true {
        true => {
            // Original borrow ends at end of match arm
            let mut x = 1;
            let y = &x;
            //~^ immutable borrow occurs here
            let z = &mut x; //~ ERROR cannot borrow
            //~^ mutable borrow occurs here
        }
     //~^ NOTE immutable borrow ends here
        false => ()
    }
}
fn foo ( ) { match true { true => { // Original borrow ends at end of match arm let mut x = 1 ; let y = & x ; //~^ immutable borrow occurs here let z = & mut x ; //~ ERROR cannot borrow //~^ mutable borrow occurs here } //~^ NOTE immutable borrow ends here false => ( ) } }
~^ NOTE mutable borrow ends here
~^ NOTE mutable borrow ends here