Remove feature(import_shadowing).
This commit is contained in:
parent
6869645e86
commit
53edd767b4
2 changed files with 1 additions and 20 deletions
|
@ -1748,10 +1748,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
||||||
import_span: Span,
|
import_span: Span,
|
||||||
name: Name,
|
name: Name,
|
||||||
namespace: Namespace) {
|
namespace: Namespace) {
|
||||||
if self.session.features.borrow().import_shadowing {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
debug!("check_for_conflicting_import: {}; target exists: {}",
|
debug!("check_for_conflicting_import: {}; target exists: {}",
|
||||||
token::get_name(name).get(),
|
token::get_name(name).get(),
|
||||||
target.is_some());
|
target.is_some());
|
||||||
|
@ -1791,10 +1787,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
||||||
&ImportResolution,
|
&ImportResolution,
|
||||||
import_span: Span,
|
import_span: Span,
|
||||||
name: Name) {
|
name: Name) {
|
||||||
if self.session.features.borrow().import_shadowing {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// First, check for conflicts between imports and `extern crate`s.
|
// First, check for conflicts between imports and `extern crate`s.
|
||||||
if module.external_module_children
|
if module.external_module_children
|
||||||
.borrow()
|
.borrow()
|
||||||
|
@ -1888,10 +1880,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
||||||
module: &Module,
|
module: &Module,
|
||||||
name: Name,
|
name: Name,
|
||||||
span: Span) {
|
span: Span) {
|
||||||
if self.session.features.borrow().import_shadowing {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if module.external_module_children.borrow().contains_key(&name) {
|
if module.external_module_children.borrow().contains_key(&name) {
|
||||||
self.session
|
self.session
|
||||||
.span_err(span,
|
.span_err(span,
|
||||||
|
@ -1906,10 +1894,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
||||||
module: &Module,
|
module: &Module,
|
||||||
name: Name,
|
name: Name,
|
||||||
span: Span) {
|
span: Span) {
|
||||||
if self.session.features.borrow().import_shadowing {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if module.external_module_children.borrow().contains_key(&name) {
|
if module.external_module_children.borrow().contains_key(&name) {
|
||||||
self.session
|
self.session
|
||||||
.span_err(span,
|
.span_err(span,
|
||||||
|
|
|
@ -64,7 +64,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
|
||||||
|
|
||||||
("rustc_diagnostic_macros", Active),
|
("rustc_diagnostic_macros", Active),
|
||||||
("unboxed_closures", Active),
|
("unboxed_closures", Active),
|
||||||
("import_shadowing", Active),
|
("import_shadowing", Removed),
|
||||||
("advanced_slice_patterns", Active),
|
("advanced_slice_patterns", Active),
|
||||||
("tuple_indexing", Accepted),
|
("tuple_indexing", Accepted),
|
||||||
("associated_types", Accepted),
|
("associated_types", Accepted),
|
||||||
|
@ -127,7 +127,6 @@ enum Status {
|
||||||
pub struct Features {
|
pub struct Features {
|
||||||
pub unboxed_closures: bool,
|
pub unboxed_closures: bool,
|
||||||
pub rustc_diagnostic_macros: bool,
|
pub rustc_diagnostic_macros: bool,
|
||||||
pub import_shadowing: bool,
|
|
||||||
pub visible_private_types: bool,
|
pub visible_private_types: bool,
|
||||||
pub quote: bool,
|
pub quote: bool,
|
||||||
pub old_orphan_check: bool,
|
pub old_orphan_check: bool,
|
||||||
|
@ -139,7 +138,6 @@ impl Features {
|
||||||
Features {
|
Features {
|
||||||
unboxed_closures: false,
|
unboxed_closures: false,
|
||||||
rustc_diagnostic_macros: false,
|
rustc_diagnostic_macros: false,
|
||||||
import_shadowing: false,
|
|
||||||
visible_private_types: false,
|
visible_private_types: false,
|
||||||
quote: false,
|
quote: false,
|
||||||
old_orphan_check: false,
|
old_orphan_check: false,
|
||||||
|
@ -537,7 +535,6 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::C
|
||||||
(Features {
|
(Features {
|
||||||
unboxed_closures: cx.has_feature("unboxed_closures"),
|
unboxed_closures: cx.has_feature("unboxed_closures"),
|
||||||
rustc_diagnostic_macros: cx.has_feature("rustc_diagnostic_macros"),
|
rustc_diagnostic_macros: cx.has_feature("rustc_diagnostic_macros"),
|
||||||
import_shadowing: cx.has_feature("import_shadowing"),
|
|
||||||
visible_private_types: cx.has_feature("visible_private_types"),
|
visible_private_types: cx.has_feature("visible_private_types"),
|
||||||
quote: cx.has_feature("quote"),
|
quote: cx.has_feature("quote"),
|
||||||
old_orphan_check: cx.has_feature("old_orphan_check"),
|
old_orphan_check: cx.has_feature("old_orphan_check"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue