-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Description
- I have searched open and closed issues and pull requests for duplicates, using these search terms:
- appendix generic
- I have checked the latest
mainbranch to see if this has already been fixed, in this file:- src/appendix-02-operators.md
URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/appendix-02-operators.html
Description of the problem:
In Table B-5, the terms "Generic parameter" and "Generic type" seem to be used interchangeably. Is there a difference between them?
book/src/appendix-02-operators.md
Lines 135 to 145 in f660f34
| <span class="caption">Table B-5: Trait Bound Constraints</span> | |
| | Symbol | Explanation | | |
| | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | |
| | `T: U` | Generic parameter `T` constrained to types that implement `U` | | |
| | `T: 'a` | Generic type `T` must outlive lifetime `'a` (meaning the type cannot transitively contain any references with lifetimes shorter than `'a`) | | |
| | `T: 'static` | Generic type `T` contains no borrowed references other than `'static` ones | | |
| | `'b: 'a` | Generic lifetime `'b` must outlive lifetime `'a` | | |
| | `T: ?Sized` | Allow generic type parameter to be a dynamically sized type | | |
| | `'a + trait`, `trait + trait` | Compound type constraint | | |
Suggested fix:
Pick one or the other.
Metadata
Metadata
Assignees
Labels
No labels