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
arbitrary_self_types don't support lifetime elision #52675
I mentioned this on the RFC recently, but since this is being hit by futures 0.3 I thought it's worth having an issue for the current implementation in case it's an easy fix.
error[E0106]: missing lifetime specifier
--> src/main.rs:15:32
|
15 | fn c(self: Bar<'_>) -> Bar<'_> {
| ^^ expected lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
= help: consider giving it a 'static lifetime
Activity
[-]arbitrary_self_types break lifetime elision[/-][+]arbitrary_self_types don't support lifetime elision[/+]nox commentedon Mar 11, 2019
Any progress on that? I need this feature in Servo and the absence of lifetime elision is a huge papercut.
Nemo157 commentedon Apr 10, 2019
This also interacts with the just added suggestion in #58919, the suggested fix won't work:
suggests adding
+ '_to the return type, but that givesAuto merge of #60944 - taiki-e:arbitrary_self_types-lifetime-elision,…
Auto merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-…
Rollup merge of rust-lang#61207 - taiki-e:arbitrary_self_types-lifeti…
Rollup merge of rust-lang#61207 - taiki-e:arbitrary_self_types-lifeti…
Rollup merge of rust-lang#61207 - taiki-e:arbitrary_self_types-lifeti…
Rollup merge of rust-lang#61207 - taiki-e:arbitrary_self_types-lifeti…