Skip to content

Commit a010162

Browse files
committed
nomicon: Fix variance in example
&'b mut B was described incorrectly (just in this example, is correct in the actual text).
1 parent 64c21f9 commit a010162

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/nomicon/subtyping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ use std::cell::Cell;
200200

201201
struct Foo<'a, 'b, A: 'a, B: 'b, C, D, E, F, G, H> {
202202
a: &'a A, // variant over 'a and A
203-
b: &'b mut B, // invariant over 'b and B
203+
b: &'b mut B, // variant over 'b and invariant over B
204204
c: *const C, // variant over C
205205
d: *mut D, // invariant over D
206206
e: Vec<E>, // variant over E

0 commit comments

Comments
 (0)