Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c0a9d64

Browse files
committed
stable-sort-primitive: make lint adhere to lint message convention
1 parent 3337f79 commit c0a9d64

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

clippy_lints/src/stable_sort_primitive.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ impl LateLintPass<'_> for StableSortPrimitive {
111111
STABLE_SORT_PRIMITIVE,
112112
expr.span,
113113
format!(
114-
"Use {} instead of {}",
115-
detection.method.unstable_name(),
116-
detection.method.stable_name()
114+
"used {} instead of {}",
115+
detection.method.stable_name(),
116+
detection.method.unstable_name()
117117
)
118118
.as_str(),
119119
"try",

tests/ui/stable_sort_primitive.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
error: Use sort_unstable instead of sort
1+
error: used sort instead of sort_unstable
22
--> $DIR/stable_sort_primitive.rs:7:5
33
|
44
LL | vec.sort();
55
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
66
|
77
= note: `-D clippy::stable-sort-primitive` implied by `-D warnings`
88

9-
error: Use sort_unstable instead of sort
9+
error: used sort instead of sort_unstable
1010
--> $DIR/stable_sort_primitive.rs:9:5
1111
|
1212
LL | vec.sort();
1313
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
1414

15-
error: Use sort_unstable instead of sort
15+
error: used sort instead of sort_unstable
1616
--> $DIR/stable_sort_primitive.rs:11:5
1717
|
1818
LL | vec.sort();
1919
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
2020

21-
error: Use sort_unstable instead of sort
21+
error: used sort instead of sort_unstable
2222
--> $DIR/stable_sort_primitive.rs:13:5
2323
|
2424
LL | vec.sort();
2525
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
2626

27-
error: Use sort_unstable instead of sort
27+
error: used sort instead of sort_unstable
2828
--> $DIR/stable_sort_primitive.rs:15:5
2929
|
3030
LL | vec.sort();
3131
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
3232

33-
error: Use sort_unstable instead of sort
33+
error: used sort instead of sort_unstable
3434
--> $DIR/stable_sort_primitive.rs:17:5
3535
|
3636
LL | vec.sort();
3737
| ^^^^^^^^^^ help: try: `vec.sort_unstable()`
3838

39-
error: Use sort_unstable instead of sort
39+
error: used sort instead of sort_unstable
4040
--> $DIR/stable_sort_primitive.rs:19:5
4141
|
4242
LL | arr.sort();

0 commit comments

Comments
 (0)