]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/bugs/issue-100013.rs
5 // We really should accept this, but we need implied bounds between the regions
6 // in a generator interior.
8 pub trait FutureIterator
{
9 type Future
<'s
, 'cx
>: Send
14 fn call
<I
: FutureIterator
>() -> impl Send
{
15 async
{ // a generator checked for autotrait impl `Send`
16 //~^ lifetime bound not satisfied
17 let x
= None
::<I
::Future
<'_
, '_
>>; // a type referencing GAT
18 async {}
.await
; // a yield point
22 fn call2
<'a
, 'b
, I
: FutureIterator
>() -> impl Send
{
23 async
{ // a generator checked for autotrait impl `Send`
24 //~^ lifetime bound not satisfied
25 let x
= None
::<I
::Future
<'a
, 'b
>>; // a type referencing GAT
26 //~^ lifetime may not live long enough
27 async {}
.await
; // a yield point
31 fn call3
<'a
: 'b
, 'b
, I
: FutureIterator
>() -> impl Send
{
32 async
{ // a generator checked for autotrait impl `Send`
33 //~^ lifetime bound not satisfied
34 let x
= None
::<I
::Future
<'a
, 'b
>>; // a type referencing GAT
35 async {}
.await
; // a yield point