Skip to content

Commit bf6b0a8

Browse files
committed
swap-1
1 parent 38a898b commit bf6b0a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/ui/ptr_ops/ptr-swap-basic.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
//! Check the basic functionality of `std::mem::swap` to ensure it correctly
2+
//! exchanges the values of two mutable variables.
3+
14
//@ run-pass
25

36
use std::mem::swap;
47

58
pub fn main() {
6-
let mut x = 3; let mut y = 7;
9+
let mut x = 3;
10+
let mut y = 7;
711
swap(&mut x, &mut y);
812
assert_eq!(x, 7);
913
assert_eq!(y, 3);

0 commit comments

Comments
 (0)