mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
14 lines
233 B
Rust
14 lines
233 B
Rust
//@ run-pass
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
pub fn main() {
|
|
use std::mem::replace;
|
|
let mut x = 5;
|
|
let _ = replace(&mut x, 6);
|
|
{
|
|
use std::mem::*;
|
|
let mut y = 6;
|
|
swap(&mut x, &mut y);
|
|
}
|
|
}
|