Skip to content

Commit 01f0814

Browse files
committed
Stabilize use_nested_groups
1 parent 07ea260 commit 01f0814

9 files changed

+4
-181
lines changed

src/doc/unstable-book/src/language-features/use-nested-groups.md

-90
This file was deleted.

src/libsyntax/feature_gate.rs

+2-26
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,6 @@ declare_features! (
423423
// In-band lifetime bindings (e.g. `fn foo(x: &'a u8) -> &'a u8`)
424424
(active, in_band_lifetimes, "1.23.0", Some(44524)),
425425

426-
// Nested groups in `use` (RFC 2128)
427-
(active, use_nested_groups, "1.23.0", Some(44494)),
428-
429426
// generic associated types (RFC 1598)
430427
(active, generic_associated_types, "1.23.0", Some(44265)),
431428

@@ -544,6 +541,8 @@ declare_features! (
544541
(accepted, repr_align, "1.24.0", Some(33626)),
545542
// allow '|' at beginning of match arms (RFC 1925)
546543
(accepted, match_beginning_vert, "1.25.0", Some(44101)),
544+
// Nested groups in `use` (RFC 2128)
545+
(accepted, use_nested_groups, "1.25.0", Some(44494)),
547546
);
548547

549548
// If you change this, please modify src/doc/unstable-book as well. You must
@@ -1805,29 +1804,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
18051804
visit::walk_path(self, path);
18061805
}
18071806

1808-
fn visit_use_tree(&mut self, use_tree: &'a ast::UseTree, id: NodeId, nested: bool) {
1809-
if nested {
1810-
match use_tree.kind {
1811-
ast::UseTreeKind::Simple(_) => {
1812-
if use_tree.prefix.segments.len() != 1 {
1813-
gate_feature_post!(&self, use_nested_groups, use_tree.span,
1814-
"paths in `use` groups are experimental");
1815-
}
1816-
}
1817-
ast::UseTreeKind::Glob => {
1818-
gate_feature_post!(&self, use_nested_groups, use_tree.span,
1819-
"glob imports in `use` groups are experimental");
1820-
}
1821-
ast::UseTreeKind::Nested(_) => {
1822-
gate_feature_post!(&self, use_nested_groups, use_tree.span,
1823-
"nested groups in `use` are experimental");
1824-
}
1825-
}
1826-
}
1827-
1828-
visit::walk_use_tree(self, use_tree, id);
1829-
}
1830-
18311807
fn visit_vis(&mut self, vis: &'a ast::Visibility) {
18321808
if let ast::Visibility::Crate(span, ast::CrateSugar::JustCrate) = *vis {
18331809
gate_feature_post!(&self, crate_visibility_modifier, span,

src/test/compile-fail/absolute-paths-in-nested-use-groups.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(use_nested_groups)]
1211
#![allow(unused_imports)]
1312

1413
mod foo {}

src/test/run-pass/issue-47673.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(use_nested_groups)]
1211
#![allow(unused_import)]
1312

1413
use {{}, {}};

src/test/run-pass/use-nested-groups.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(use_nested_groups)]
12-
1311
mod a {
1412
pub enum B {}
1513

src/test/ui/feature-gate-use_nested_groups.rs

-31
This file was deleted.

src/test/ui/feature-gate-use_nested_groups.stderr

-26
This file was deleted.

src/test/ui/use-nested-groups-error.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(use_nested_groups)]
12-
1311
mod a {
1412
pub mod b1 {
1513
pub enum C2 {}

src/test/ui/use-nested-groups-error.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0432]: unresolved import `a::b1::C1`
2-
--> $DIR/use-nested-groups-error.rs:21:14
2+
--> $DIR/use-nested-groups-error.rs:19:14
33
|
4-
21 | use a::{b1::{C1, C2}, B2};
4+
19 | use a::{b1::{C1, C2}, B2};
55
| ^^ no `C1` in `a::b1`. Did you mean to use `C2`?
66

77
error: aborting due to previous error

0 commit comments

Comments
 (0)