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