Skip to content
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

document implicit lifetime bounds #1063

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tlyu
Copy link
Contributor

@tlyu tlyu commented Jul 8, 2021

Add documentation about implicit lifetime bounds that the compiler
can infer for functions, trait implementations, and structs.
This draws from RFC 2093 (for structs) and RFC 1214 for functions
and trait implementations.

This is built on #1062 and #1060.

It does substantially increase the length of the page it's on, so I would be open to some reorganization.

Fixes #289.

tlyu added 5 commits July 6, 2021 19:13
Move text about the timing of checking of bounds on generics
from the "Where clauses" subsection to "Trait and lifetime
bounds", where it makes more sense. Split parts of the example
accordingly. Correct an error about when `Clone`, `Copy`, and
`Sized` trait bounds are checked.
Clarify that "outlives" really means "lives at least as long as".
Also fix some more minor punctuation and wording issues.
Add documentation about implicit lifetime bounds that the compiler
can infer for functions, trait implementations, and structs.
This draws from RFC 2093 (for structs) and RFC 1214 for functions
and trait implementations.
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 this pull request may close these issues.

Infered lifetime bounds (RFC 2093)
1 participant