{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiafls73xwycxc3lwlioqv3usmslsvh56u6r57cb4mzjtsv4bsjzxm",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mjxmeg64eha2"
},
"path": "/t/pre-rfc-t-trait-dyn-trait/21911#post_13",
"publishedAt": "2026-04-20T22:03:10.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "Using the fake syntax above, you would need something like..\n\n\n fn same_vtable<T: MyTrait>(a: &dyn MyTrait, b: &dyn MyTrait) -> Option<(&dyn T, &dyn T)> {\n // returns None if a and b are actually different types\n }\n\n\nWhere the two returned `&dyn T`s are just `&dyn MyTrait`s that we know to have the same type `T` (but we don't know statically what this type is)\n\nThe issue with this fake syntax is that this function isn't actually monomorphized for each `T` so the generics syntax doesn't fit",
"title": "Pre-RFC: &[T: Trait] -> &dyn [Trait]"
}