rustc-dev-guide
rustc-dev-guide copied to clipboard
Update opaque-types-type-alias-impl-trait.md
- Clarify that there is a single concrete type for an opaque type
- Clarify that defining a type alias to an opaque type is an unstable feature
- Add complete example
- Clarify that defining an associate type as opaque is an unstable feature
- Add another complete example
I struggled quite a bit with this one and chatbots failed to help, so I'm pretty confident a complete example is warranted here 😅
I'm a little concerned that the #[define_opaque(Foo)] annotation is needed on the standalone function, but not on the member function (method). Could this be a bug?
Maybe Boxy you know better? r? @BoxyUwU