From 3f932eab18b61f63acc5cc0edccc8dbad0d8c6e1 Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 11 Apr 2023 10:48:38 +0200 Subject: [PATCH 1/2] extend the sixth requirement --- src/solve/trait-solving.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/solve/trait-solving.md b/src/solve/trait-solving.md index 71f6581c2..893066d86 100644 --- a/src/solve/trait-solving.md +++ b/src/solve/trait-solving.md @@ -96,6 +96,10 @@ Trait solving during codegen should have the same result as during typeck. As we all free regions during codegen we must not rely on them during typeck. A noteworthy example is special behavior for `'static`. +We also have to be careful with relying on equality of regions in the trait solver. +This is fine for codegen, as we treat all erased regions are equal. We can however +loose equality information from HIR to MIR typeck. + ### 7. Removing ambiguity makes strictly more things compile We *should* not rely on ambiguity for things to compile. From a89a3af57856aa674611e44340f8aeea734670ef Mon Sep 17 00:00:00 2001 From: lcnr Date: Wed, 12 Apr 2023 21:55:45 +0200 Subject: [PATCH 2/2] typo --- src/solve/trait-solving.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solve/trait-solving.md b/src/solve/trait-solving.md index 893066d86..b0cd9af6c 100644 --- a/src/solve/trait-solving.md +++ b/src/solve/trait-solving.md @@ -98,7 +98,7 @@ is special behavior for `'static`. We also have to be careful with relying on equality of regions in the trait solver. This is fine for codegen, as we treat all erased regions are equal. We can however -loose equality information from HIR to MIR typeck. +lose equality information from HIR to MIR typeck. ### 7. Removing ambiguity makes strictly more things compile