summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr')
-rw-r--r--src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr b/src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr
new file mode 100644
index 000000000..e63d58746
--- /dev/null
+++ b/src/tools/clippy/tests/ui/unit_return_expecting_ord.stderr
@@ -0,0 +1,39 @@
+error: this closure returns the unit type which also implements Ord
+ --> $DIR/unit_return_expecting_ord.rs:18:25
+ |
+LL | structs.sort_by_key(|s| {
+ | ^^^
+ |
+ = note: `-D clippy::unit-return-expecting-ord` implied by `-D warnings`
+help: probably caused by this trailing semicolon
+ --> $DIR/unit_return_expecting_ord.rs:19:24
+ |
+LL | double(s.field);
+ | ^
+
+error: this closure returns the unit type which also implements PartialOrd
+ --> $DIR/unit_return_expecting_ord.rs:22:30
+ |
+LL | structs.is_sorted_by_key(|s| {
+ | ^^^
+ |
+help: probably caused by this trailing semicolon
+ --> $DIR/unit_return_expecting_ord.rs:23:24
+ |
+LL | double(s.field);
+ | ^
+
+error: this closure returns the unit type which also implements PartialOrd
+ --> $DIR/unit_return_expecting_ord.rs:25:30
+ |
+LL | structs.is_sorted_by_key(|s| {
+ | ^^^
+
+error: this closure returns the unit type which also implements Ord
+ --> $DIR/unit_return_expecting_ord.rs:35:25
+ |
+LL | structs.sort_by_key(|s| unit(s.field));
+ | ^^^
+
+error: aborting due to 4 previous errors
+