'static lifetime & trait objects
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 18.3k
- Forks
- 4.1k
- Avg merge
- 14m
- Merged PRs (30d)
- 1
Description
I bumped into some issues with using trait objects and I was informed by other nice Rust folks that I have to add 'static lifetime to my trait for this to work. I was quite puzzled since according the book 'static lifetime means "to exist throughout the lifetime of the program" but it does not say that it has different meaning when you associate it with traits. I think it would be very helpful if the book explained what 'static means to traits.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no file, test, or entry point. Locate the book’s existing discussion of 'static lifetimes and trait objects, then determine where an explanation should be added and verify that it clearly addresses the reported confusion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100