Rename grammar rule TypeParamBounds to just Bounds#2258
Rename grammar rule TypeParamBounds to just Bounds#2258ehuss merged 1 commit intorust-lang:masterfrom
TypeParamBounds to just Bounds#2258Conversation
|
Sounds reasonable to me. Can you also update the sentence in |
02a79dd to
cbe9a8a
Compare
|
I've gone ahead and removed the mention entirely: -Type paths are used within type definitions, trait bounds, type parameter bounds, and qualified paths.
+Type paths are used within type definitions, trait bounds, and qualified paths.That's because it was redundant anyway. Bound (formerly TypeParamBound) is defined as Lifetime | TraitBound | UseBound but TraitBound is already listed in that sentence and obviously Lifetime and UseBound don't contain TypePaths. |
|
Edit: Dropped again since I forgot about URL stability and since I can't be bothered to add redirects (if you even can; I only know about the JS-driven URL fragment redirects); the Book and the rustc book both reference |
cbe9a8a to
d6f4cc4
Compare
I take issue with the name of grammar rule TypeParamBounds. Bounds aren't inherently tied to type parameters, they can perfectly exist without them. This name stems from an ancient time when where-clauses didn't exist yet and bounds could only be put on type parameters. Today, that is no longer true.
Consider the following program which contains bounds that aren't associated with type parameters in any way:
Bounds can be placed on any type. I'd also be fine with renaming it to TypeBounds, just anything but TypeParamBounds :)