Update src/vec/vec-layout.md

Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
pull/381/head
nils 3 years ago committed by GitHub
parent eb351ec767
commit 9003ef672a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,7 +17,7 @@ pub struct Vec<T> {
And indeed this would compile. Unfortunately, it would be too strict. The
compiler will give us too strict variance. So a `&Vec<&'static str>`
couldn't be used where an `&Vec<&'a str>` was expected. See [the chapter
couldn't be used where a `&Vec<&'a str>` was expected. See [the chapter
on ownership and lifetimes][ownership] for all the details on variance.
As we saw in the ownership chapter, the standard library uses `Unique<T>` in place of

Loading…
Cancel
Save