rust/tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
110 B
Rust
Raw Normal View History

fn main() {
foo(&mut 5);
}
2020-09-23 23:05:59 -05:00
const fn foo(x: &mut i32) -> i32 { //~ ERROR mutable references
*x + 1
2020-09-17 12:32:07 -05:00
}