Skip to content

Commit 20e3604

Browse files
committed
Remove feature(import_shadowing).
1 parent 8abcbab commit 20e3604

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

src/librustc_resolve/lib.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,10 +1748,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
17481748
import_span: Span,
17491749
name: Name,
17501750
namespace: Namespace) {
1751-
if self.session.features.borrow().import_shadowing {
1752-
return
1753-
}
1754-
17551751
debug!("check_for_conflicting_import: {}; target exists: {}",
17561752
token::get_name(name).get(),
17571753
target.is_some());
@@ -1791,10 +1787,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
17911787
&ImportResolution,
17921788
import_span: Span,
17931789
name: Name) {
1794-
if self.session.features.borrow().import_shadowing {
1795-
return
1796-
}
1797-
17981790
// First, check for conflicts between imports and `extern crate`s.
17991791
if module.external_module_children
18001792
.borrow()
@@ -1888,10 +1880,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
18881880
module: &Module,
18891881
name: Name,
18901882
span: Span) {
1891-
if self.session.features.borrow().import_shadowing {
1892-
return
1893-
}
1894-
18951883
if module.external_module_children.borrow().contains_key(&name) {
18961884
self.session
18971885
.span_err(span,
@@ -1906,10 +1894,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
19061894
module: &Module,
19071895
name: Name,
19081896
span: Span) {
1909-
if self.session.features.borrow().import_shadowing {
1910-
return
1911-
}
1912-
19131897
if module.external_module_children.borrow().contains_key(&name) {
19141898
self.session
19151899
.span_err(span,

src/libsyntax/feature_gate.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
6464

6565
("rustc_diagnostic_macros", Active),
6666
("unboxed_closures", Active),
67-
("import_shadowing", Active),
67+
("import_shadowing", Removed),
6868
("advanced_slice_patterns", Active),
6969
("tuple_indexing", Accepted),
7070
("associated_types", Accepted),
@@ -127,7 +127,6 @@ enum Status {
127127
pub struct Features {
128128
pub unboxed_closures: bool,
129129
pub rustc_diagnostic_macros: bool,
130-
pub import_shadowing: bool,
131130
pub visible_private_types: bool,
132131
pub quote: bool,
133132
pub old_orphan_check: bool,
@@ -139,7 +138,6 @@ impl Features {
139138
Features {
140139
unboxed_closures: false,
141140
rustc_diagnostic_macros: false,
142-
import_shadowing: false,
143141
visible_private_types: false,
144142
quote: false,
145143
old_orphan_check: false,
@@ -537,7 +535,6 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::C
537535
(Features {
538536
unboxed_closures: cx.has_feature("unboxed_closures"),
539537
rustc_diagnostic_macros: cx.has_feature("rustc_diagnostic_macros"),
540-
import_shadowing: cx.has_feature("import_shadowing"),
541538
visible_private_types: cx.has_feature("visible_private_types"),
542539
quote: cx.has_feature("quote"),
543540
old_orphan_check: cx.has_feature("old_orphan_check"),

0 commit comments

Comments
 (0)