summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/unused/unused-async.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lint/unused/unused-async.stderr')
-rw-r--r--src/test/ui/lint/unused/unused-async.stderr26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/lint/unused/unused-async.stderr b/src/test/ui/lint/unused/unused-async.stderr
new file mode 100644
index 000000000..6bbc9e2bf
--- /dev/null
+++ b/src/test/ui/lint/unused/unused-async.stderr
@@ -0,0 +1,26 @@
+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
+