diff options
Diffstat (limited to 'src/test/ui/generic-associated-types/bugs/issue-100013.rs')
-rw-r--r-- | src/test/ui/generic-associated-types/bugs/issue-100013.rs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/test/ui/generic-associated-types/bugs/issue-100013.rs b/src/test/ui/generic-associated-types/bugs/issue-100013.rs deleted file mode 100644 index fc4e47a3b..000000000 --- a/src/test/ui/generic-associated-types/bugs/issue-100013.rs +++ /dev/null @@ -1,39 +0,0 @@ -// check-fail -// known-bug -// edition: 2021 - -// We really should accept this, but we need implied bounds between the regions -// in a generator interior. - -pub trait FutureIterator { - type Future<'s, 'cx>: Send - where - 's: 'cx; -} - -fn call<I: FutureIterator>() -> impl Send { - async { // a generator checked for autotrait impl `Send` - //~^ lifetime bound not satisfied - let x = None::<I::Future<'_, '_>>; // a type referencing GAT - async {}.await; // a yield point - } -} - -fn call2<'a, 'b, I: FutureIterator>() -> impl Send { - async { // a generator checked for autotrait impl `Send` - //~^ lifetime bound not satisfied - let x = None::<I::Future<'a, 'b>>; // a type referencing GAT - //~^ lifetime may not live long enough - async {}.await; // a yield point - } -} - -fn call3<'a: 'b, 'b, I: FutureIterator>() -> impl Send { - async { // a generator checked for autotrait impl `Send` - //~^ lifetime bound not satisfied - let x = None::<I::Future<'a, 'b>>; // a type referencing GAT - async {}.await; // a yield point - } -} - -fn main() {} |