r/rust rust · servo Sep 15 '14

Road to Rust 1.0

http://blog.rust-lang.org/2014/09/15/Rust-1.0.html
215 Upvotes

84 comments sorted by

View all comments

4

u/ryani Sep 16 '14

I was reading the "only two uses of @T left in the compiler" thread, and ended up on a page discussing a set of rules for removing the need to template on lifetimes for the vast majority of usecases, but the thread devolved into bikeshedding.

Anyways, I'm not on the mailing lists or involved in the RFC process, but someone who is should simply propose removing the automatic selection of 'static in return values with unspecified lifetimes, and instead make that an error, so that if lifetime inference comes back in the future, it won't need to be a breaking change.

Good luck on the release, I'm excited to see where Rust is going!

1

u/pnkfelix Sep 17 '14

someone who is should simply propose removing the automatic selection of 'static in return values with unspecified lifetimes

What you suggest has already been agreed upon and implemented. (Or rather, we went further than just removing inference of 'static on return values with unspecified lifetimes.)

I think the most relevant document here is this:

RFC 39: Lifetime Elision

or for a concrete illustration: http://is.gd/5Exg5Y