From 193f4767314e474065b70a07f0489d8f189d6fbe Mon Sep 17 00:00:00 2001 From: Mason Loyet Date: Sun, 8 Jan 2023 16:47:32 -0500 Subject: [PATCH] Fix typo: lifetimes becomes references. The sentence refers to lifetimes being covariant, when what is meant is that references are covariant over lifetimes. --- src/subtyping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subtyping.md b/src/subtyping.md index 6f0c12d..4b08d06 100644 --- a/src/subtyping.md +++ b/src/subtyping.md @@ -335,7 +335,7 @@ we inherited invariance as soon as we put our reference inside an `&mut T`. As it turns out, the argument for why it's ok for Box (and Vec, Hashmap, etc.) to be covariant is pretty similar to the argument for why it's ok for -lifetimes to be covariant: as soon as you try to stuff them in something like a +references to be covariant: as soon as you try to stuff them in something like a mutable reference, they inherit invariance and you're prevented from doing anything bad.