If I hit a specific area to deep-dive on, I often end up in the RFCs. They're not organized like a book and some later ones override earlier ones (which aren't consistently updated to point to the newer ones), so it is a more work. You also might have to go browse the PR and tracking issue to get the full picture, to boot. (In fact, always check the tracking issue to see if it's actually stable yet.) But sadly, there are a number of advanced topics where the only adequate documentation I'm aware of are the RFCs.
Another place, if there happens to be a post or series about it, is Niko's blog (Baby Steps). A lot of "big change" ideas start there, including ones that haven't landed yet but are expected to (Polonius, Chalk). Given when 1.0 came out (with it's backwards compatibility guarantees), most posts since 2015 should still be relevant. Even the earlier ones may be indications of Rust's future.
(Side note: Anyone know how to get a single list of posts out of the new format, like it used to be? An RSS URL maybe? Clicking through 20 pages excerpts is much less reference-happy.)
After that I typically spend some time writing toy programs in the playground, if applicable.
Here are a few links I've found fruitful. OK, a lot of links -- I decided I'd find this useful enough for myself that I just looked through the RFC list and Niko's blog for anything related to your list . The list is something you'd want to cherry pick for your current interest, not something to tackle on one go. Most advanced topics I have to revisit a few times, personally.
(Note: dyn Trait
is relatively new, so in a lot of these you'll just see "trait object" and Trait
. Also, in the older pre-1.0 ones, you may see Box<T>
written as ~T
.)
- Anonymous (infered) lifeteimes,
T: 'a
anddyn Trait + 'a
- RFC 141: lifetime elision (e.g. in
fn
signatures) - RFC 192: origin of
T: 'a
anddyn Trait: 'a bounds
- RFC 599: elision of the
dyn
bound- This forum post is great at explaining/exploring the interaction of unsized coercion and
dyn Trait
's lifetime. In short the coercion can take effect before invariance, which can be unintuitive.
- This forum post is great at explaining/exploring the interaction of unsized coercion and
- RFC 1156: Adjstument to the elision
RFC 1214: syntactical rules for
T: 'a
(includingT=dyn Trait
)- RFC 2093: Infer outlives
- RFC 2113:
dyn Trait
syntax RFC 2115: [implicit/elided] argument lifetimes
- This is where
'_
came from, which is stable - Implicit declaration of named lifetimes (aka in-band lifetimes) is not stable (personally I hope it stays that way)
- This is where
- RFC 2250:
dyn Trait1 + Trait2
syntax
- RFC 141: lifetime elision (e.g. in
- Variance and HRTB
- RFC 387: Higher Ranked Trait Bounds (HRTB) (
for<'a>
)- This is also apparently where subtyping of higher ranked types also originated (
for<'a> fn(&'a ())
,for<'a> dyn Trait + 'a
) - This comment illustrates the subtyping for
fn
pointers; it also applies todyn Trait
- This is also apparently where subtyping of higher ranked types also originated (
- RFC 738: Variance
- RFC 387: Higher Ranked Trait Bounds (HRTB) (
impl Trait
and existential typesRFC 1522: Conservative
impl Trait
(return position)- RFC 1951: Expand
impl Trait
(argument position) - RFC 2071:
impl Trait
existential types (not yet stable) - RFC 2515:
type
aliasimpl Trait
(TAIT) (not yet stable) - Crate to work around
impl Trait
's hidden lifetime bug- Which links to some issues and posts that highlight a current pitfall of
impl Trait
/ existential lifetimes when compared todyn Trait
s type erasure and lifetime bound) - Understanding this requires understanding a lot about both
dyn
and TAIT, IMO
- Which links to some issues and posts that highlight a current pitfall of
- Advanced(?) lifetimes and ownership
- Non-lexical Lifetimes (NLL)
- (This is what we have now, lifetimes used to be lexically scoped)
- Baby Steps one, two, three, four, five (two phase borrows), six
RFC 2094: NLL
- Polonius
- Stacked borrows
- Interprocedural conflicts / partial borrowing / view
struct
s - Ownership and shared mutability
- Baby Steps: The sentinel pattern
- Baby Steps: Rooting an
Rc
handle - Baby Steps: Iterating over a
Vec<Rc<T>>
- Temporarily opt-in to shared mutation
GhostCell
(may be part of Rust eventually, but is not yet)
- Non-lexical Lifetimes (NLL)