]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/swap.fixed
Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup
[rust.git] / src / tools / clippy / tests / ui / swap.fixed
index 24b229235d33a476f5d7ba5e45d7112a188658be..805a2ba5a59844543ecc2471c0c5f18d3de751cc 100644 (file)
@@ -155,3 +155,12 @@ fn issue_8154() {
     let s = S3(&mut s);
     std::mem::swap(&mut s.0.x, &mut s.0.y);
 }
+
+const fn issue_9864(mut u: u32) -> u32 {
+    let mut v = 10;
+
+    let temp = u;
+    u = v;
+    v = temp;
+    u + v
+}