Repository navigation
Syntactically reject leading parenthesized precise capturing lists in bare trait object types ((use<…>)+) - #162652
Conversation
|
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<…>)+`)
|
@rfcbot fcp merge lang |
|
@tmandry has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
This comment was marked as outdated.
This comment was marked as outdated.
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
@rfcbot reviewed |
…r=adwinwhite Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`) Follow-up to rust-lang#162269. Addresses fmease/rasur#7 (item 6). <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…uwer Rollup of 7 pull requests Successful merges: - #162652 (Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`)) - #163337 (MIR move elimination [3/6]: PreciseLiveness) - #163954 (fix(bootstrap/darwin): fix rpath for distributed LLD) - #163956 (Pass the unremapped path to the `rustc` invocation for doctests) - #163634 (move overflow lint computation into decorator) - #163727 (rigid aliases to non-rigid for fully normalized check) - #163745 (replace `fully_monomorphized` with `cx.typing_env()`)
Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`) Follow-up to #162269. Addresses fmease/rasur#7 (item 6). <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
|
⌛ Testing commit fc6fa6d with merge 5458ca3... Workflow: https://github.com/rust-lang/rust/actions/runs/37902581796 |
…r=adwinwhite Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`) Follow-up to rust-lang#162269. Addresses fmease/rasur#7 (item 6). <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
|
@bors yield |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #164024. |
…uwer Rollup of 11 pull requests Successful merges: - #162652 (Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`)) - #163337 (MIR move elimination [3/6]: PreciseLiveness) - #163954 (fix(bootstrap/darwin): fix rpath for distributed LLD) - #163956 (Pass the unremapped path to the `rustc` invocation for doctests) - #163634 (move overflow lint computation into decorator) - #163666 (Updates the expect message library/core/src/time.rs) - #163727 (rigid aliases to non-rigid for fully normalized check) - #163745 (replace `fully_monomorphized` with `cx.typing_env()`) - #164000 (When mentioning that closure doesn't implement trait, point at closure) - #164007 ([rustdoc] Prefer local paths over remote ones when foreign item is locally reexported) - #164017 (cg_llvm: Avoid some explicit casts to `*const c_char`)
…r=adwinwhite Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`) Follow-up to rust-lang#162269. Addresses fmease/rasur#7 (item 6). <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…r=adwinwhite Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`) Follow-up to rust-lang#162269. Addresses fmease/rasur#7 (item 6). <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…uwer Rollup of 14 pull requests Successful merges: - #162652 (Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`)) - #163337 (MIR move elimination [3/6]: PreciseLiveness) - #163954 (fix(bootstrap/darwin): fix rpath for distributed LLD) - #163193 (cfi: mangle `f128` as `e` rather than `g` on platforms without `_Float128`) - #163634 (move overflow lint computation into decorator) - #163666 (Updates the expect message library/core/src/time.rs) - #163727 (rigid aliases to non-rigid for fully normalized check) - #163745 (replace `fully_monomorphized` with `cx.typing_env()`) - #163912 (Fix debug assert failure in `note_obligation_cause_code_inner`) - #163972 (const-eval: ICE when we hit a non-const fn) - #164000 (When mentioning that closure doesn't implement trait, point at closure) - #164007 ([rustdoc] Prefer local paths over remote ones when foreign item is locally reexported) - #164017 (cg_llvm: Avoid some explicit casts to `*const c_char`) - #164025 (Less `CanonicalVarValues`)
…r=adwinwhite Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`) Follow-up to rust-lang#162269. Addresses fmease/rasur#7 (item 6). <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…uwer Rollup of 14 pull requests Successful merges: - #162652 (Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`)) - #163337 (MIR move elimination [3/6]: PreciseLiveness) - #163954 (fix(bootstrap/darwin): fix rpath for distributed LLD) - #163193 (cfi: mangle `f128` as `e` rather than `g` on platforms without `_Float128`) - #163634 (move overflow lint computation into decorator) - #163666 (Updates the expect message library/core/src/time.rs) - #163727 (rigid aliases to non-rigid for fully normalized check) - #163745 (replace `fully_monomorphized` with `cx.typing_env()`) - #163912 (Fix debug assert failure in `note_obligation_cause_code_inner`) - #163950 (don't treat inherited opaques as defining) - #164000 (When mentioning that closure doesn't implement trait, point at closure) - #164007 ([rustdoc] Prefer local paths over remote ones when foreign item is locally reexported) - #164017 (cg_llvm: Avoid some explicit casts to `*const c_char`) - #164025 (Less `CanonicalVarValues`)
…uwer Rollup of 24 pull requests Successful merges: - #161998 ( Support type-relative assoc item paths in generic param defaults & const param types) - #162106 (Helpful suggestions for incorrect address-of mutability (2)) - #162652 (Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`)) - #163337 (MIR move elimination [3/6]: PreciseLiveness) - #163938 (-Zassumptions-on-binders: rewrite alias outlives constraints more goodly) - #163939 (Better debug impls for some assumptions on binders types) - #163954 (fix(bootstrap/darwin): fix rpath for distributed LLD) - #163956 (Pass the unremapped path to the `rustc` invocation for doctests) - #164042 (Allow testing cg-gcc on any target) - #162443 (Do not retain `Normalization` goal errors in nested goals for `BestObligationVisitor:: non_trivial_candidates `) - #162908 (Fix - const parameters rejected when identical) - #163193 (cfi: mangle `f128` as `e` rather than `g` on platforms without `_Float128`) - #163634 (move overflow lint computation into decorator) - #163666 (Updates the expect message library/core/src/time.rs) - #163727 (rigid aliases to non-rigid for fully normalized check) - #163745 (replace `fully_monomorphized` with `cx.typing_env()`) - #163912 (Fix debug assert failure in `note_obligation_cause_code_inner`) - #163950 (don't treat inherited opaques as defining) - #163972 (const-eval: ICE when we hit a non-const fn) - #164000 (When mentioning that closure doesn't implement trait, point at closure) - #164007 ([rustdoc] Prefer local paths over remote ones when foreign item is locally reexported) - #164008 (properly ignore the current goal's usages) - #164017 (cg_llvm: Avoid some explicit casts to `*const c_char`) - #164025 (Less `CanonicalVarValues`)
Rollup merge of #162652 - fmease:reject-bare-obj-paren-use, r=adwinwhite Syntactically reject leading parenthesized precise capturing lists in bare trait object types (`(use<…>)+`) Follow-up to #162269. Addresses fmease/rasur#7 (item 6). <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
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)