Uh oh!
There was an error while loading. Please reload this page.
Parse impl restrictions - #152943
Conversation
rustbot
commented
Feb 21, 2026
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
Kivooeo
commented
Feb 21, 2026
since this is more a compiler related change, I'll reroll from @jhpratt r? compiler |
Urgau
commented
Feb 21, 2026
This PR is linked to a GSOC idea/proposal, where I and @jhpratt are mentors, we will both review it. r? Urgau |
This comment has been minimized.
This comment has been minimized.
It turns out the CI is failing because I was printing |
1ad4b8a to
0345b89CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
14453b8 to
13e1685CompareCoCo-Japan-pan
commented
Feb 22, 2026
@Urgau Thanks for the feedback! I've addressed all the comments. Ready for another look! |
There was a problem hiding this comment.
Look good to me. I will let @jhpratt do the final review.
Urgau
commented
Feb 22, 2026
Btw, 17 commits is a bit too much, it would be great if you could squash them to max 2/3 commits. |
Uh oh!
There was an error while loading. Please reload this page.
7d71945 to
50d182eCompareimpl restriction to ASTimpl restrictions286fff4 to
5c157c0Compare
This comment has been minimized.
This comment has been minimized.
rustbot
commented
Feb 28, 2026
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
jhpratt
commented
Mar 3, 2026
LGTM! @Urgau Any particular preference regarding this?
The current commits (10) all seem reasonable to me; I reviewed commit-by-commit. A couple could reasonably be folded into their preceding commit, but I don't think it's egregious or anything.
|
Urgau
commented
Mar 3, 2026
I'm fine with the 10 commits as they currently are. Let's merge it. @bors r=Urgau,jhpratt |
…rse, r=Urgau,jhpratt
Parse `impl` restrictions
This PR implements the parsing logic for `impl` restrictions (e.g., `pub impl(crate) trait Foo {}`) as proposed in [RFC 3323](https://rust-lang.github.io/rfcs/3323-restrictions.html).
As the first step of the RFC implementation, this PR focuses strictly on the parsing phase. The new syntax is guarded by the `#![feature(impl_restriction)]` feature gate.
This implementation basically follows the pattern used in rust-lang#141754.
r? @jhpratt…uwer Rollup of 6 pull requests Successful merges: - #153336 (stdarch subtree update) - #152943 (Parse `impl` restrictions) - #153184 (Replace CodegenResults with CompiledModules) - #153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR) - #153319 (Comments and docs: add missing periods to "ie.") - #153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #152943 - CoCo-Japan-pan:impl-restriction-parse, r=Urgau,jhpratt Parse `impl` restrictions This PR implements the parsing logic for `impl` restrictions (e.g., `pub impl(crate) trait Foo {}`) as proposed in [RFC 3323](https://rust-lang.github.io/rfcs/3323-restrictions.html). As the first step of the RFC implementation, this PR focuses strictly on the parsing phase. The new syntax is guarded by the `#![feature(impl_restriction)]` feature gate. This implementation basically follows the pattern used in #141754. r? @jhpratt
…uwer Rollup of 6 pull requests Successful merges: - rust-lang/rust#153336 (stdarch subtree update) - rust-lang/rust#152943 (Parse `impl` restrictions) - rust-lang/rust#153184 (Replace CodegenResults with CompiledModules) - rust-lang/rust#153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR) - rust-lang/rust#153319 (Comments and docs: add missing periods to "ie.") - rust-lang/rust#153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
…uwer Rollup of 6 pull requests Successful merges: - rust-lang/rust#153336 (stdarch subtree update) - rust-lang/rust#152943 (Parse `impl` restrictions) - rust-lang/rust#153184 (Replace CodegenResults with CompiledModules) - rust-lang/rust#153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR) - rust-lang/rust#153319 (Comments and docs: add missing periods to "ie.") - rust-lang/rust#153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
…rse, r=Urgau,jhpratt
Parse `impl` restrictions
This PR implements the parsing logic for `impl` restrictions (e.g., `pub impl(crate) trait Foo {}`) as proposed in [RFC 3323](https://rust-lang.github.io/rfcs/3323-restrictions.html).
As the first step of the RFC implementation, this PR focuses strictly on the parsing phase. The new syntax is guarded by the `#![feature(impl_restriction)]` feature gate.
This implementation basically follows the pattern used in rust-lang#141754.
r? @jhpratt…uwer Rollup of 6 pull requests Successful merges: - rust-lang/rust#153336 (stdarch subtree update) - rust-lang/rust#152943 (Parse `impl` restrictions) - rust-lang/rust#153184 (Replace CodegenResults with CompiledModules) - rust-lang/rust#153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR) - rust-lang/rust#153319 (Comments and docs: add missing periods to "ie.") - rust-lang/rust#153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
…eck, r=jhpratt,Urgau Semantic checks of `impl` restrictions This PR implements semantic checks for `impl` restrictions proposed in the [Restrictions RFC](https://rust-lang.github.io/rfcs/3323-restrictions.html) (Tracking Issue rust-lang#105077), and linked to a [GSOC idea/proposal](https://github.com/rust-lang/google-summer-of-code/tree/142433eb3b104b2f32bae0b9dfafb78a0a2ac579?tab=readme-ov-file#implementing-impl-and-mut-restrictions). It lowers the resolved paths of `impl` restrictions from the AST to HIR and into `TraitDef`, and integrates the checks into the coherence phase by extending `check_impl`. As parsing (rust-lang#152943) and path resolution (rust-lang#153556) have already been implemented, this PR provides a working implementation of `impl` restrictions. r? @Urgau cc @jhpratt
…eck, r=jhpratt,Urgau Semantic checks of `impl` restrictions This PR implements semantic checks for `impl` restrictions proposed in the [Restrictions RFC](https://rust-lang.github.io/rfcs/3323-restrictions.html) (Tracking Issue rust-lang#105077), and linked to a [GSOC idea/proposal](https://github.com/rust-lang/google-summer-of-code/tree/142433eb3b104b2f32bae0b9dfafb78a0a2ac579?tab=readme-ov-file#implementing-impl-and-mut-restrictions). It lowers the resolved paths of `impl` restrictions from the AST to HIR and into `TraitDef`, and integrates the checks into the coherence phase by extending `check_impl`. As parsing (rust-lang#152943) and path resolution (rust-lang#153556) have already been implemented, this PR provides a working implementation of `impl` restrictions. r? @Urgau cc @jhpratt
Rollup merge of #154661 - CoCo-Japan-pan:impl-restriction-check, r=jhpratt,Urgau Semantic checks of `impl` restrictions This PR implements semantic checks for `impl` restrictions proposed in the [Restrictions RFC](https://rust-lang.github.io/rfcs/3323-restrictions.html) (Tracking Issue #105077), and linked to a [GSOC idea/proposal](https://github.com/rust-lang/google-summer-of-code/tree/142433eb3b104b2f32bae0b9dfafb78a0a2ac579?tab=readme-ov-file#implementing-impl-and-mut-restrictions). It lowers the resolved paths of `impl` restrictions from the AST to HIR and into `TraitDef`, and integrates the checks into the coherence phase by extending `check_impl`. As parsing (#152943) and path resolution (#153556) have already been implemented, this PR provides a working implementation of `impl` restrictions. r? @Urgau cc @jhpratt
…pratt,Urgau Semantic checks of `impl` restrictions This PR implements semantic checks for `impl` restrictions proposed in the [Restrictions RFC](https://rust-lang.github.io/rfcs/3323-restrictions.html) (Tracking Issue rust-lang/rust#105077), and linked to a [GSOC idea/proposal](https://github.com/rust-lang/google-summer-of-code/tree/142433eb3b104b2f32bae0b9dfafb78a0a2ac579?tab=readme-ov-file#implementing-impl-and-mut-restrictions). It lowers the resolved paths of `impl` restrictions from the AST to HIR and into `TraitDef`, and integrates the checks into the coherence phase by extending `check_impl`. As parsing (rust-lang/rust#152943) and path resolution (rust-lang/rust#153556) have already been implemented, this PR provides a working implementation of `impl` restrictions. r? @Urgau cc @jhpratt
…gau,jhpratt
Parse `impl` restrictions
This PR implements the parsing logic for `impl` restrictions (e.g., `pub impl(crate) trait Foo {}`) as proposed in [RFC 3323](https://rust-lang.github.io/rfcs/3323-restrictions.html).
As the first step of the RFC implementation, this PR focuses strictly on the parsing phase. The new syntax is guarded by the `#![feature(impl_restriction)]` feature gate.
This implementation basically follows the pattern used in #141754.
r? @jhpratt…uwer Rollup of 6 pull requests Successful merges: - rust-lang/rust#153336 (stdarch subtree update) - rust-lang/rust#152943 (Parse `impl` restrictions) - rust-lang/rust#153184 (Replace CodegenResults with CompiledModules) - rust-lang/rust#153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR) - rust-lang/rust#153319 (Comments and docs: add missing periods to "ie.") - rust-lang/rust#153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
…uwer Rollup of 6 pull requests Successful merges: - rust-lang/rust#153336 (stdarch subtree update) - rust-lang/rust#152943 (Parse `impl` restrictions) - rust-lang/rust#153184 (Replace CodegenResults with CompiledModules) - rust-lang/rust#153285 (Update call-llvm-intrinsics test for Rust 1.94.0 IR) - rust-lang/rust#153319 (Comments and docs: add missing periods to "ie.") - rust-lang/rust#153326 (Make `rustc_with_all_queries!` pass query modifiers as named values)
…pratt,Urgau Semantic checks of `impl` restrictions This PR implements semantic checks for `impl` restrictions proposed in the [Restrictions RFC](https://rust-lang.github.io/rfcs/3323-restrictions.html) (Tracking Issue rust-lang/rust#105077), and linked to a [GSOC idea/proposal](https://github.com/rust-lang/google-summer-of-code/tree/142433eb3b104b2f32bae0b9dfafb78a0a2ac579?tab=readme-ov-file#implementing-impl-and-mut-restrictions). It lowers the resolved paths of `impl` restrictions from the AST to HIR and into `TraitDef`, and integrates the checks into the coherence phase by extending `check_impl`. As parsing (rust-lang/rust#152943) and path resolution (rust-lang/rust#153556) have already been implemented, this PR provides a working implementation of `impl` restrictions. r? @Urgau cc @jhpratt
This PR implements the parsing logic for
implrestrictions (e.g.,pub impl(crate) trait Foo {}) as proposed in RFC 3323.As the first step of the RFC implementation, this PR focuses strictly on the parsing phase. The new syntax is guarded by the
#![feature(impl_restriction)]feature gate.This implementation basically follows the pattern used in #141754.
r? @jhpratt