summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/nested-return-type4.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/impl-trait/nested-return-type4.rs')
-rw-r--r--src/test/ui/impl-trait/nested-return-type4.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/nested-return-type4.rs b/src/test/ui/impl-trait/nested-return-type4.rs
new file mode 100644
index 000000000..cec70bb1a
--- /dev/null
+++ b/src/test/ui/impl-trait/nested-return-type4.rs
@@ -0,0 +1,8 @@
+// edition: 2021
+
+fn test<'s: 's>(s: &'s str) -> impl std::future::Future<Output = impl Sized> {
+ async move { let _s = s; }
+ //~^ ERROR hidden type for `impl Future<Output = impl Sized>` captures lifetime that does not appear in bounds
+}
+
+fn main() {}