summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/gat-outlives.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/impl-trait/in-trait/gat-outlives.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/gat-outlives.rs b/tests/ui/impl-trait/in-trait/gat-outlives.rs
new file mode 100644
index 000000000..83dd6cfce
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/gat-outlives.rs
@@ -0,0 +1,17 @@
+// edition: 2021
+
+use std::future::Future;
+
+trait Trait {
+ type Gat<'a>;
+ //~^ ERROR missing required bound on `Gat`
+ async fn foo(&self) -> Self::Gat<'_>;
+}
+
+trait Trait2 {
+ type Gat<'a>;
+ //~^ ERROR missing required bound on `Gat`
+ async fn foo(&self) -> impl Future<Output = Self::Gat<'_>>;
+}
+
+fn main() {}