mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
c2c73189c8
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
15 lines
450 B
Text
15 lines
450 B
Text
error: this looks like you are trying to swap `a` and `b`
|
|
--> $DIR/no_std_swap.rs:12:5
|
|
|
|
|
LL | / a = b;
|
|
LL | |
|
|
LL | |
|
|
LL | | b = a;
|
|
| |_________^ help: try: `core::mem::swap(&mut a, &mut b)`
|
|
|
|
|
= note: or maybe you should use `core::mem::replace`?
|
|
= note: `-D clippy::almost-swapped` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::almost_swapped)]`
|
|
|
|
error: aborting due to 1 previous error
|
|
|