You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hidden type for impl Trait captures lifetime that does not appear in bounds #96771
Yet another problem related to 'static and async but this time impl Trait is involved somehow. Funny enough, the error goes away when the number of arguments is decreased to 2 instead of 3.
// Try removing one argument to successfully compileasyncfnfoo(a:&'statici32,b:&i32,c:&i32,) -> Option<&'statici32>{None}
It is worth noting that a different error arises when the return is not 'static.
Activity
aliemjay commentedon May 6, 2022
This is #63033.
A workaround exists that shouldn't change the semantics of the function:
@rustbot label T-compiler A-async_await C-bug
c410-f3r commentedon May 6, 2022
Oh, this is indeed #63033. I could swear the error message was different, my bad.
Closing as duplicated but the the successful compilation of 2 or less arguments is still a bit strange