mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
60 lines
2.1 KiB
Text
60 lines
2.1 KiB
Text
error: used `sort` on primitive type `i32`
|
|
--> tests/ui/stable_sort_primitive.rs:7:5
|
|
|
|
|
LL | vec.sort();
|
|
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
|
|
|
|
|
= note: an unstable sort typically performs faster without any observable difference for this data type
|
|
= note: `-D clippy::stable-sort-primitive` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::stable_sort_primitive)]`
|
|
|
|
error: used `sort` on primitive type `bool`
|
|
--> tests/ui/stable_sort_primitive.rs:9:5
|
|
|
|
|
LL | vec.sort();
|
|
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
|
|
|
|
|
= note: an unstable sort typically performs faster without any observable difference for this data type
|
|
|
|
error: used `sort` on primitive type `char`
|
|
--> tests/ui/stable_sort_primitive.rs:11:5
|
|
|
|
|
LL | vec.sort();
|
|
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
|
|
|
|
|
= note: an unstable sort typically performs faster without any observable difference for this data type
|
|
|
|
error: used `sort` on primitive type `str`
|
|
--> tests/ui/stable_sort_primitive.rs:13:5
|
|
|
|
|
LL | vec.sort();
|
|
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
|
|
|
|
|
= note: an unstable sort typically performs faster without any observable difference for this data type
|
|
|
|
error: used `sort` on primitive type `tuple`
|
|
--> tests/ui/stable_sort_primitive.rs:15:5
|
|
|
|
|
LL | vec.sort();
|
|
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
|
|
|
|
|
= note: an unstable sort typically performs faster without any observable difference for this data type
|
|
|
|
error: used `sort` on primitive type `array`
|
|
--> tests/ui/stable_sort_primitive.rs:17:5
|
|
|
|
|
LL | vec.sort();
|
|
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
|
|
|
|
|
= note: an unstable sort typically performs faster without any observable difference for this data type
|
|
|
|
error: used `sort` on primitive type `i32`
|
|
--> tests/ui/stable_sort_primitive.rs:19:5
|
|
|
|
|
LL | arr.sort();
|
|
| ^^^^^^^^^^ help: try: `arr.sort_unstable()`
|
|
|
|
|
= note: an unstable sort typically performs faster without any observable difference for this data type
|
|
|
|
error: aborting due to 7 previous errors
|
|
|