rust/tests/ui/mut/mut-ref.rs

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

12 lines
200 B
Rust
Raw Normal View History

2024-03-24 01:04:45 +00:00
//@ check-pass
2024-03-26 05:23:26 +00:00
#![allow(incomplete_features)]
#![feature(mut_ref)]
fn main() {
2024-03-24 01:04:45 +00:00
let mut ref x = 10;
x = &11;
let ref mut y = 12;
*y = 13;
let mut ref mut z = 14;
z = &mut 15;
}