Syntactically reject leading parenthesized precise capturing lists in bare trait object types ((use<…>)+) - #162652
Syntactically reject leading parenthesized precise capturing lists in bare trait object types ((use<…>)+)#162652fmease wants to merge 1 commit into
(use<…>)+)#162652Conversation
|
r? @adwinwhite rustbot has assigned @adwinwhite. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
This is so niche that it does not need a crater run IMO and it might not even require an FCP. |
(use<…>)+)(use<…>)+)
1c3974f to
b41ef23
Compare
|
Context for T-lang: We generally only support parenthesizing trait bounds, not however any other kind of bound (namely, outlives-bounds and use-bounds) and as it stands there would be no use in generalizing this part of the grammar. So we allow bounds like ...Well, when precise capturing lists were introduced & stabilized, something was overlooked: While we correctly reject bare trait object types1 like Note that all of this only concerns the grammar of Rust as use-bounds are semantically invalid in trait object types anyway. This is just part of my ongoing efforts to deep clean Rust's grammar + rustc's parser. Arguably this is super niche and thus I actually think that merging this w/o a T-lang FCP would be fine but I wanted to at least inform you of this. The Reference doesn't need updating as it already conforms to what I expect & propose here. See also TraitObjectType, Bound etc. Footnotes
|
b41ef23 to
fc6fa6d
Compare
… bare trait object types (`(use<…>)+`)
Follow-up to #162269. Addresses fmease/rasur#7 (item 6).
(No LLM was or will be used by me during the entire creation process of this PR)