rust/tests/ui/feature-gates/feature-gate-mut-ref.rs
Jules Bertholet 528d45af18
Feature gate
2024-03-27 11:20:28 -04:00

14 lines
298 B
Rust

fn main() {
let mut ref x = 10; //~ ERROR [E0658]
x = &11;
let ref mut y = 12;
*y = 13;
let mut ref mut z = 14; //~ ERROR [E0658]
z = &mut 15;
#[cfg(FALSE)]
let mut ref x = 10; //~ ERROR [E0658]
#[cfg(FALSE)]
let mut ref mut y = 10; //~ ERROR [E0658]
}