From 108b75ef7097a970d8f8c83480519c2db0897349 Mon Sep 17 00:00:00 2001 From: tbodt Date: Fri, 9 May 2025 14:34:32 -0700 Subject: [PATCH] Explain why nested receivers are dyn-incompatible It's not true that they're not supported *yet* - fundamentally, it's not possible to downcast the inner pointer (i.e. removing its vtable) while it is stuck inside the outer pointer --- src/items/traits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/items/traits.md b/src/items/traits.md index 6420b8bb3..61db5e076 100644 --- a/src/items/traits.md +++ b/src/items/traits.md @@ -173,7 +173,7 @@ trait DynIncompatible { fn foo() {} // ERROR: associated function without Sized fn returns(&self) -> Self; // ERROR: Self in return type fn typed(&self, x: T) {} // ERROR: has generic type parameters - fn nested(self: Rc>) {} // ERROR: nested receiver not yet supported + fn nested(self: Rc>) {} // ERROR: nested receiver cannot be downcasted } struct S;