https://codecs.multimedia.cx/2018/05/rust-lifetimes-sugar/ …
@rustlang do you think would be acceptable for an rfc?
-
-
Replying to @lu_zero_
We had this, but removed it. There are reasons.... but we actually have some accepted RFCs that do similar things, and will be in for the 2018 edition. “In-band lifetimes”
1 reply 0 retweets 2 likes -
Replying to @rustlang
If you have a link I'll pass it to Kostya. We are having fun building multimedia using rust but sometimes we disagree on what the language should or should not provide :)
1 reply 0 retweets 1 like -
Replying to @lu_zero_
https://rust-lang-nursery.github.io/edition-guide/2018/transitioning/ownership-and-lifetimes/in-band-lifetimes.html … and related sections are some okay docs, follow the links to the tracking issue and RFC for more.
1 reply 0 retweets 0 likes -
This doesn’t have a struct example in it so it’s not perfect, but something like struct Foo<‘_> { x: &i32, } was at least proposed somewhere, I forget off the top of my head if it made it in. The ‘_ is different from his proposal is important; you want to see that it...
1 reply 0 retweets 0 likes -
... contains a borrow, so removing it entirely isn’t likely to happen.
1 reply 0 retweets 0 likes -
Without it is actually legal today in some circumstances, like fn foo(&self) -> Foo But we’re going to lint against that and make you write fn foo(&self) -> Foo<‘_> so you can see the borrow, for this reason
1 reply 0 retweets 0 likes -
Replying to @rustlang
Sounds good to me. The important information remains and we have a nice "default to the marker above if omitted" that reduces the verboseness. Hopefully Kostya will be happy about it as well :)
1 reply 0 retweets 1 like
I spoke with @ManishEarth and he believes that the struct thing may have been postponed. Not a thing we’ve outright rejected at least!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.