mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
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 rust-lang/rust#141754.
r? @jhpratt
This commit is contained in:
@@ -520,6 +520,8 @@ pub fn internal(&self, feature: Symbol) -> bool {
|
||||
(unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
|
||||
/// Target features on hexagon.
|
||||
(unstable, hexagon_target_feature, "1.27.0", Some(150250)),
|
||||
/// Allows `impl(crate) trait Foo` restrictions.
|
||||
(incomplete, impl_restriction, "CURRENT_RUSTC_VERSION", Some(105077)),
|
||||
/// Allows `impl Trait` to be used inside associated types (RFC 2515).
|
||||
(unstable, impl_trait_in_assoc_type, "1.70.0", Some(63063)),
|
||||
/// Allows `impl Trait` in bindings (`let`).
|
||||
|
||||
Reference in New Issue
Block a user