File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ fn main() {
93
93
94
94
The signature of ` overwrite ` is clearly valid: it takes mutable references to
95
95
two values of the same type, and overwrites one with the other. If ` &mut T ` was
96
- variant over T, then ` &mut &'a str ` would be a subtype of ` &mut &'static str ` ,
97
- since ` &'a str ` is a subtype of ` &'static str ` . Therefore the lifetime of
96
+ variant over T, then ` &mut &'static str ` would be a subtype of ` &mut &'a str ` ,
97
+ since ` &'static str ` is a subtype of ` &'a str ` . Therefore the lifetime of
98
98
` forever_str ` would successfully be "shrunk" down to the shorter lifetime of
99
99
` string ` , and ` overwrite ` would be called successfully. ` string ` would
100
100
subsequently be dropped, and ` forever_str ` would point to freed memory when we
You can’t perform that action at this time.
0 commit comments