summary refs log tree commit diff
path: root/src/test/ui/consts/const-mut-refs/feature-gate-const_mut_refs.rs
blob: 2207599815ee8056198f2a3bbdcb03ffa93bab66 (plain)
1
2
3
4
5
6
7
fn main() {
    foo(&mut 5);
}

const fn foo(x: &mut i32) -> i32 { //~ ERROR mutable references in const fn are unstable
    *x + 1
}