Skip to content

Commit ea0c621

Browse files
committed
Remove feature(import_shadowing).
1 parent 84f5ad8 commit ea0c621

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
@@ -3007,10 +3007,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
30073007
import_span: Span,
30083008
name: Name,
30093009
namespace: Namespace) {
3010-
if self.session.features.borrow().import_shadowing {
3011-
return
3012-
}
3013-
30143010
debug!("check_for_conflicting_import: {}; target exists: {}",
30153011
token::get_name(name).get(),
30163012
target.is_some());
@@ -3050,10 +3046,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
30503046
&ImportResolution,
30513047
import_span: Span,
30523048
name: Name) {
3053-
if self.session.features.borrow().import_shadowing {
3054-
return
3055-
}
3056-
30573049
// First, check for conflicts between imports and `extern crate`s.
30583050
if module.external_module_children
30593051
.borrow()
@@ -3147,10 +3139,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
31473139
module: &Module,
31483140
name: Name,
31493141
span: Span) {
3150-
if self.session.features.borrow().import_shadowing {
3151-
return
3152-
}
3153-
31543142
if module.external_module_children.borrow().contains_key(&name) {
31553143
self.session
31563144
.span_err(span,
@@ -3165,10 +3153,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
31653153
module: &Module,
31663154
name: Name,
31673155
span: Span) {
3168-
if self.session.features.borrow().import_shadowing {
3169-
return
3170-
}
3171-
31723156
if module.external_module_children.borrow().contains_key(&name) {
31733157
self.session
31743158
.span_err(span,

src/libsyntax/feature_gate.rs

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

6464
("rustc_diagnostic_macros", Active),
6565
("unboxed_closures", Active),
66-
("import_shadowing", Active),
66+
("import_shadowing", Removed),
6767
("advanced_slice_patterns", Active),
6868
("tuple_indexing", Accepted),
6969
("associated_types", Active),
@@ -104,7 +104,6 @@ pub struct Features {
104104
pub default_type_params: bool,
105105
pub unboxed_closures: bool,
106106
pub rustc_diagnostic_macros: bool,
107-
pub import_shadowing: bool,
108107
pub visible_private_types: bool,
109108
pub quote: bool,
110109
pub opt_out_copy: bool,
@@ -116,7 +115,6 @@ impl Features {
116115
default_type_params: false,
117116
unboxed_closures: false,
118117
rustc_diagnostic_macros: false,
119-
import_shadowing: false,
120118
visible_private_types: false,
121119
quote: false,
122120
opt_out_copy: false,
@@ -425,7 +423,6 @@ pub fn check_crate(span_handler: &SpanHandler, krate: &ast::Crate) -> (Features,
425423
default_type_params: cx.has_feature("default_type_params"),
426424
unboxed_closures: cx.has_feature("unboxed_closures"),
427425
rustc_diagnostic_macros: cx.has_feature("rustc_diagnostic_macros"),
428-
import_shadowing: cx.has_feature("import_shadowing"),
429426
visible_private_types: cx.has_feature("visible_private_types"),
430427
quote: cx.has_feature("quote"),
431428
opt_out_copy: cx.has_feature("opt_out_copy"),

0 commit comments

Comments
 (0)