rustc-dev-guide icon indicating copy to clipboard operation
rustc-dev-guide copied to clipboard

Update opaque-types-type-alias-impl-trait.md

Open smanilov opened this issue 7 months ago • 1 comments

  1. Clarify that there is a single concrete type for an opaque type
  2. Clarify that defining a type alias to an opaque type is an unstable feature
  3. Add complete example
  4. Clarify that defining an associate type as opaque is an unstable feature
  5. 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?

smanilov avatar May 30 '25 12:05 smanilov

Maybe Boxy you know better? r? @BoxyUwU

jieyouxu avatar Jun 20 '25 10:06 jieyouxu