Skip to content

Document trait objects in the book #21707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
krdln opened this issue Jan 27, 2015 · 1 comment · Fixed by #22106
Closed

Document trait objects in the book #21707

krdln opened this issue Jan 27, 2015 · 1 comment · Fixed by #22106

Comments

@krdln
Copy link
Contributor

krdln commented Jan 27, 2015

Trait objects seem not to be documented at all in the book, which together with their mandatory lifetime bound annotation makes them almost undiscoverable. Fortunately, there are some nice blog posts by @huonw, but they are unlikely for a user to stumble upon.

Also, the only occurence of 'trait object' in the reference is following sentence, which is strange:

Likewise, supertrait methods may also be called on trait objects.

@steveklabnik
Copy link
Member

Yes, this has been on my list a long time.

Manishearth added a commit to Manishearth/rust that referenced this issue Feb 10, 2015
…lexcrichton

I started to write up some docs on this, and then realized I was just repeating http://huonw.github.io/blog/2015/01/peeking-inside-trait-objects/ but worse. @huonw previously said that we can use this content if we wanted, so I made some tweaks and integrated it into the book.

Fixes rust-lang#21707
alexcrichton added a commit to alexcrichton/rust that referenced this issue Feb 10, 2015
I started to write up some docs on this, and then realized I was just repeating http://huonw.github.io/blog/2015/01/peeking-inside-trait-objects/ but worse. @huonw previously said that we can use this content if we wanted, so I made some tweaks and integrated it into the book.

Fixes rust-lang#21707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants