mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
9 lines
110 B
Rust
9 lines
110 B
Rust
fn main() {
|
|
foo(&mut 5);
|
|
}
|
|
|
|
const fn foo(x: &mut i32) -> i32 { //~ ERROR mutable references
|
|
*x + 1
|
|
|
|
}
|