Parse impl restrictions#152943
Conversation
|
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
|
since this is more a compiler related change, I'll reroll from @jhpratt r? compiler |
|
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
0345b89
Compare
This comment has been minimized.
This comment has been minimized.
14453b8 to
13e1685
Compare
|
@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.
|
Btw, 17 commits is a bit too much, it would be great if you could squash them to max 2/3 commits. |
7d71945 to
50d182e
Compare
impl restriction to ASTimpl restrictions
286fff4 to
5c157c0
Compare
This comment has been minimized.
This comment has been minimized.
5c157c0 to
3dcefa3
Compare
|
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. |
|
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.
|
|
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)
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)
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