mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-23 11:33:19 +00:00
dcd1a16dd0
Adds additional test to check for `swap` suggestion when `no_std` is present
12 lines
358 B
Text
12 lines
358 B
Text
error: this looks like you are trying to swap `a` and `b`
|
|
--> $DIR/no_std_swap.rs:13:5
|
|
|
|
|
LL | / a = b;
|
|
LL | | b = a;
|
|
| |_________^ help: try: `core::mem::swap(&mut a, &mut b)`
|
|
|
|
|
= note: `-D clippy::almost-swapped` implied by `-D warnings`
|
|
= note: or maybe you should use `core::mem::replace`?
|
|
|
|
error: aborting due to previous error
|
|
|