Skip to content

Commit 108b75e

Browse files
authored
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
1 parent 7b0febd commit 108b75e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/items/traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ trait DynIncompatible {
173173
fn foo() {} // ERROR: associated function without Sized
174174
fn returns(&self) -> Self; // ERROR: Self in return type
175175
fn typed<T>(&self, x: T) {} // ERROR: has generic type parameters
176-
fn nested(self: Rc<Box<Self>>) {} // ERROR: nested receiver not yet supported
176+
fn nested(self: Rc<Box<Self>>) {} // ERROR: nested receiver cannot be downcasted
177177
}
178178
179179
struct S;

0 commit comments

Comments
 (0)