Skip to content

Commit b016fee

Browse files
committed
Remove feature(import_shadowing).
1 parent 4fd1e62 commit b016fee

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
@@ -1745,10 +1745,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
17451745
import_span: Span,
17461746
name: Name,
17471747
namespace: Namespace) {
1748-
if self.session.features.borrow().import_shadowing {
1749-
return
1750-
}
1751-
17521748
debug!("check_for_conflicting_import: {}; target exists: {}",
17531749
token::get_name(name).get(),
17541750
target.is_some());
@@ -1788,10 +1784,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
17881784
&ImportResolution,
17891785
import_span: Span,
17901786
name: Name) {
1791-
if self.session.features.borrow().import_shadowing {
1792-
return
1793-
}
1794-
17951787
// First, check for conflicts between imports and `extern crate`s.
17961788
if module.external_module_children
17971789
.borrow()
@@ -1885,10 +1877,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
18851877
module: &Module,
18861878
name: Name,
18871879
span: Span) {
1888-
if self.session.features.borrow().import_shadowing {
1889-
return
1890-
}
1891-
18921880
if module.external_module_children.borrow().contains_key(&name) {
18931881
self.session
18941882
.span_err(span,
@@ -1903,10 +1891,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
19031891
module: &Module,
19041892
name: Name,
19051893
span: Span) {
1906-
if self.session.features.borrow().import_shadowing {
1907-
return
1908-
}
1909-
19101894
if module.external_module_children.borrow().contains_key(&name) {
19111895
self.session
19121896
.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),
@@ -124,7 +124,6 @@ enum Status {
124124
pub struct Features {
125125
pub unboxed_closures: bool,
126126
pub rustc_diagnostic_macros: bool,
127-
pub import_shadowing: bool,
128127
pub visible_private_types: bool,
129128
pub quote: bool,
130129
pub old_orphan_check: bool,
@@ -135,7 +134,6 @@ impl Features {
135134
Features {
136135
unboxed_closures: false,
137136
rustc_diagnostic_macros: false,
138-
import_shadowing: false,
139137
visible_private_types: false,
140138
quote: false,
141139
old_orphan_check: false,
@@ -520,7 +518,6 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::C
520518
(Features {
521519
unboxed_closures: cx.has_feature("unboxed_closures"),
522520
rustc_diagnostic_macros: cx.has_feature("rustc_diagnostic_macros"),
523-
import_shadowing: cx.has_feature("import_shadowing"),
524521
visible_private_types: cx.has_feature("visible_private_types"),
525522
quote: cx.has_feature("quote"),
526523
old_orphan_check: cx.has_feature("old_orphan_check"),

0 commit comments

Comments
 (0)