about summary refs log tree commit diff
path: root/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/in-trait/async-example-desugared-manual.stderr')
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-manual.stderr22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr b/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
new file mode 100644
index 00000000000..d94afd92c56
--- /dev/null
+++ b/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
@@ -0,0 +1,22 @@
+warning: impl trait in impl method signature does not match trait method signature
+  --> $DIR/async-example-desugared-manual.rs:22:22
+   |
+LL |     async fn foo(&self) -> i32;
+   |     --------------------------- return type from trait method defined here
+...
+LL |     fn foo(&self) -> MyFuture {
+   |                      ^^^^^^^^
+   |
+   = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
+note: the lint level is defined here
+  --> $DIR/async-example-desugared-manual.rs:21:12
+   |
+LL |     #[warn(refining_impl_trait)]
+   |            ^^^^^^^^^^^^^^^^^^^
+help: replace the return type so that it matches the trait
+   |
+LL |     fn foo(&self) -> impl Future<Output = i32> {
+   |                      ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+warning: 1 warning emitted
+