aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/reference1.rs
blob: ff791533754b3a216da6fcda85b397795dc57610 (plain)
1
2
3
4
5
6
fn main() {
    let a = &123;
    let b: &mut i32 = a;
    // { dg-error "mismatched mutability" "" { target *-*-* } .-1 }
    // { dg-error "expected .&mut i32. got .& i32." "" { target *-*-* } .-2 }
}