rust/tests/ui/feature-gates/feature-gate-mut-ref.rs

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

14 lines
298 B
Rust
Raw Normal View History

2024-03-26 00:23:26 -05:00
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]
}