File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1318,6 +1318,7 @@ impl Clone for BorrowRef<'_> {
13181318pub struct Ref < ' b , T : ?Sized + ' b > {
13191319 // NB: we use a pointer instead of `&'b T` to avoid `noalias` violations, because a
13201320 // `Ref` argument doesn't hold immutability for its whole scope, only until it drops.
1321+ // `NonNull` is also covariant over `T`, just like we would have with `&T`.
13211322 value : NonNull < T > ,
13221323 borrow : BorrowRef < ' b > ,
13231324}
@@ -1704,7 +1705,7 @@ pub struct RefMut<'b, T: ?Sized + 'b> {
17041705 // `RefMut` argument doesn't hold exclusivity for its whole scope, only until it drops.
17051706 value : NonNull < T > ,
17061707 borrow : BorrowRefMut < ' b > ,
1707- // NonNull is covariant over T , so we need to reintroduce invariance.
1708+ // ` NonNull` is covariant over `T` , so we need to reintroduce invariance.
17081709 marker : PhantomData < & ' b mut T > ,
17091710}
17101711
You can’t perform that action at this time.
0 commit comments