From 72fea089185bc823685373b79dd85aecd07ae050 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Thu, 21 Jul 2022 09:22:11 -0500 Subject: [PATCH 1/2] Update subtyping.md Remove "in Rust" per style guidelines, and edit sentence for clarity. --- src/subtyping.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/subtyping.md b/src/subtyping.md index 40f5a1544..7bca6c979 100644 --- a/src/subtyping.md +++ b/src/subtyping.md @@ -1,8 +1,8 @@ # Subtyping and Variance Subtyping is implicit and can occur at any stage in type checking or -inference. Subtyping in Rust is very restricted and occurs only due to -variance with respect to lifetimes and between types with higher ranked +inference. Subtyping is restricted to two cases: +variance with respect to lifetimes, and between types with higher ranked lifetimes. If we were to erase lifetimes from types, then the only subtyping would be due to type equality. From 36a66c0ccf9f8a5b941b0df9923ece80d8714c83 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 27 Jul 2022 09:22:18 -0500 Subject: [PATCH 2/2] Update src/subtyping.md Co-authored-by: Ryan Scheel --- src/subtyping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subtyping.md b/src/subtyping.md index 7bca6c979..b31e25d8a 100644 --- a/src/subtyping.md +++ b/src/subtyping.md @@ -2,7 +2,7 @@ Subtyping is implicit and can occur at any stage in type checking or inference. Subtyping is restricted to two cases: -variance with respect to lifetimes, and between types with higher ranked +variance with respect to lifetimes and between types with higher ranked lifetimes. If we were to erase lifetimes from types, then the only subtyping would be due to type equality.