]> git.lizzy.rs Git - rust.git/blob - tests/ui/swap-1.rs
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / swap-1.rs
1 // run-pass
2
3 use std::mem::swap;
4
5 pub fn main() {
6     let mut x = 3; let mut y = 7;
7     swap(&mut x, &mut y);
8     assert_eq!(x, 7);
9     assert_eq!(y, 3);
10 }