From 9a11f6e3ff6b22f41be74f4aa66fabc30040eebf Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Fri, 11 Dec 2015 18:15:57 +0100 Subject: [PATCH] nomicon: Fix variance in example &'b mut B was described incorrectly (just in this example, is correct in the actual text). --- subtyping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subtyping.md b/subtyping.md index 65dcb6a..0253a1f 100644 --- a/subtyping.md +++ b/subtyping.md @@ -200,7 +200,7 @@ use std::cell::Cell; struct Foo<'a, 'b, A: 'a, B: 'b, C, D, E, F, G, H> { a: &'a A, // variant over 'a and A - b: &'b mut B, // invariant over 'b and B + b: &'b mut B, // variant over 'b and invariant over B c: *const C, // variant over C d: *mut D, // invariant over D e: Vec, // variant over E