summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/unused/unused-async.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
commit5363f350887b1e5b5dd21a86f88c8af9d7fea6da (patch)
tree35ca005eb6e0e9a1ba3bb5dbc033209ad445dc17 /src/test/ui/lint/unused/unused-async.stderr
parentAdding debian version 1.66.0+dfsg1-1. (diff)
downloadrustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.tar.xz
rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.zip
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/lint/unused/unused-async.stderr')
-rw-r--r--src/test/ui/lint/unused/unused-async.stderr79
1 files changed, 54 insertions, 25 deletions
diff --git a/src/test/ui/lint/unused/unused-async.stderr b/src/test/ui/lint/unused/unused-async.stderr
index 6bbc9e2bf..4bcb26dc1 100644
--- a/src/test/ui/lint/unused/unused-async.stderr
+++ b/src/test/ui/lint/unused/unused-async.stderr
@@ -1,26 +1,55 @@
-warning: `must_use` attribute on `async` functions applies to the anonymous `Future` returned by the function, not the value within
- --> $DIR/unused-async.rs:5:1
- |
-LL | #[must_use]
- | ^^^^^^^^^^^
-LL |
-LL | / async fn test() -> i32 {
-LL | | 1
-LL | | }
- | |_- this attribute does nothing, the `Future`s returned by async functions are already `must_use`
- |
- = note: `#[warn(unused_attributes)]` on by default
-
-warning: `must_use` attribute on `async` functions applies to the anonymous `Future` returned by the function, not the value within
- --> $DIR/unused-async.rs:15:5
- |
-LL | #[must_use]
- | ^^^^^^^^^^^
-LL |
-LL | / async fn test_method() -> i32 {
-LL | | 1
-LL | | }
- | |_____- this attribute does nothing, the `Future`s returned by async functions are already `must_use`
-
-warning: 2 warnings emitted
+error: unused implementer of `Future` that must be used
+ --> $DIR/unused-async.rs:31:5
+ |
+LL | foo();
+ | ^^^^^
+ |
+ = note: futures do nothing unless you `.await` or poll them
+note: the lint level is defined here
+ --> $DIR/unused-async.rs:2:9
+ |
+LL | #![deny(unused_must_use)]
+ | ^^^^^^^^^^^^^^^
+
+error: unused return value of `foo` that must be used
+ --> $DIR/unused-async.rs:31:5
+ |
+LL | foo();
+ | ^^^^^
+
+error: unused output of future returned by `foo` that must be used
+ --> $DIR/unused-async.rs:33:5
+ |
+LL | foo().await;
+ | ^^^^^^^^^^^
+
+error: unused implementer of `Future` that must be used
+ --> $DIR/unused-async.rs:34:5
+ |
+LL | bar();
+ | ^^^^^
+ |
+ = note: futures do nothing unless you `.await` or poll them
+
+error: unused return value of `bar` that must be used
+ --> $DIR/unused-async.rs:34:5
+ |
+LL | bar();
+ | ^^^^^
+
+error: unused output of future returned by `bar` that must be used
+ --> $DIR/unused-async.rs:36:5
+ |
+LL | bar().await;
+ | ^^^^^^^^^^^
+
+error: unused implementer of `Future` that must be used
+ --> $DIR/unused-async.rs:37:5
+ |
+LL | baz();
+ | ^^^^^
+ |
+ = note: futures do nothing unless you `.await` or poll them
+
+error: aborting due to 7 previous errors