Practice
Learn
← Quit
0 / 0 correct
Rust
Hard
1 of 20
Why is `&mut T` invariant in T, while `&T` is covariant?
A
It's an arbitrary language choice
B
If &mut &'long str could be used as &mut &'short str, you could write a short-lived reference into a long-lived slot
C
Covariance only applies to integers
D
Mutable references are slower