Skip to content

Commit 3c85a67

Browse files
committed
stabilize feature(more_qualified_paths)
1 parent 34fe1f0 commit 3c85a67

File tree

5 files changed

+2
-13
lines changed

5 files changed

+2
-13
lines changed

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
471471
"`for<...>` binders for closures are experimental",
472472
"consider removing `for<...>`"
473473
);
474-
gate_all!(more_qualified_paths, "usage of qualified paths in this context is experimental");
475474
// yield can be enabled either by `coroutines` or `gen_blocks`
476475
if let Some(spans) = spans.get(&sym::yield_expr) {
477476
for span in spans {

compiler/rustc_feature/src/accepted.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ declare_features! (
295295
(accepted, min_const_unsafe_fn, "1.33.0", Some(55607)),
296296
/// Allows exhaustive pattern matching on uninhabited types when matched by value.
297297
(accepted, min_exhaustive_patterns, "1.82.0", Some(119612)),
298+
/// Allows qualified paths in struct expressions, struct patterns and tuple struct patterns.
299+
(accepted, more_qualified_paths, "CURRENT_RUSTC_VERSION", Some(86935)),
298300
/// Allows using `Self` and associated types in struct expressions and patterns.
299301
(accepted, more_struct_aliases, "1.16.0", Some(37544)),
300302
/// Allows using the MOVBE target feature.

compiler/rustc_feature/src/unstable.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,6 @@ declare_features! (
569569
/// standard library until the soundness issues with specialization
570570
/// are fixed.
571571
(unstable, min_specialization, "1.7.0", Some(31844)),
572-
/// Allows qualified paths in struct expressions, struct patterns and tuple struct patterns.
573-
(unstable, more_qualified_paths, "1.54.0", Some(86935)),
574572
/// Allows the `#[must_not_suspend]` attribute.
575573
(unstable, must_not_suspend, "1.57.0", Some(83310)),
576574
/// Allows `mut ref` and `mut ref mut` identifier patterns.

compiler/rustc_parse/src/parser/expr.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,9 +1649,6 @@ impl<'a> Parser<'a> {
16491649
} else if self.check(exp!(OpenBrace))
16501650
&& let Some(expr) = self.maybe_parse_struct_expr(&qself, &path)
16511651
{
1652-
if qself.is_some() {
1653-
self.psess.gated_spans.gate(sym::more_qualified_paths, path.span);
1654-
}
16551652
return expr;
16561653
} else {
16571654
(path.span, ExprKind::Path(qself, path))

compiler/rustc_parse/src/parser/pat.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,10 +1381,6 @@ impl<'a> Parser<'a> {
13811381

13821382
/// Parse a struct ("record") pattern (e.g. `Foo { ... }` or `Foo::Bar { ... }`).
13831383
fn parse_pat_struct(&mut self, qself: Option<P<QSelf>>, path: Path) -> PResult<'a, PatKind> {
1384-
if qself.is_some() {
1385-
// Feature gate the use of qualified paths in patterns
1386-
self.psess.gated_spans.gate(sym::more_qualified_paths, path.span);
1387-
}
13881384
self.bump();
13891385
let (fields, etc) = self.parse_pat_fields().unwrap_or_else(|mut e| {
13901386
e.span_label(path.span, "while parsing the fields for this pattern");
@@ -1411,9 +1407,6 @@ impl<'a> Parser<'a> {
14111407
CommaRecoveryMode::EitherTupleOrPipe,
14121408
)
14131409
})?;
1414-
if qself.is_some() {
1415-
self.psess.gated_spans.gate(sym::more_qualified_paths, path.span);
1416-
}
14171410
Ok(PatKind::TupleStruct(qself, path, fields))
14181411
}
14191412

0 commit comments

Comments
 (0)