> T only contains owned types<p>I'd say this is true, because I consider &mut T and &T to be owned types in their own right. They own a pointer. I can cast them to raw pointers. &T impl's Copy even if T doesn't. <a href="https://doc.rust-lang.org/1.43.1/src/core/marker.rs.html#794" rel="nofollow">https://doc.rust-lang.org/1.43.1/src/core/marker.rs.html#794</a><p>Otherwise, the compilation is great.
Reading this document suddenly made learning Rust a lot scarier, and also increases my respect to Rust developers (people writing programs in Rust). It kind of shows that increased safety doesn't come for free.
Coming from JS it was rather counterintuitive for me that a function would "own" a value even if it was ran synchronously and finished.<p>Also, the whole 'move' terminology sounded to me like Rust would move memory around, but it usually referred to the move of ownership. Also 'consume' didn't make no sense to me. "into_iter consumes a vector" what does it mean? Where does the vector go?<p>The most valuable info I got about lifetimes was: references/borrowing is usually what you want, so always throw in a &.
This is an EXCELLENT article. Point # 8 should be directly in the Rust book.<p>"Once a variable is bounded by a lifetime it is bounded by that lifetime forever. The lifetime of a variable can only shrink, and all the shrinkage is determined at compile-time."