From f53314cd70dd194ea40c55a5d8ceae7b94409aea Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Mon, 29 Dec 2014 09:33:25 +1300 Subject: [PATCH] Remove the glob/shadowing exception bug [breaking-change] This and the other commit in this PR change the rules for shadowing and globs to be stricter. There were previously bugs where some glob imports would not be checked for shadowing. Those are now fixed and you may have to adjust your imports to use fewer globs. --- src/librustc_resolve/lib.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 720883a8e9a..b228f45e640 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -345,9 +345,6 @@ impl Rib { #[deriving(Show,PartialEq,Clone,Copy)] enum Shadowable { Always, - /// Means that the recorded import obeys the glob shadowing rules, i.e., can - /// only be shadowed by another glob import. - Glob, Never } @@ -1719,11 +1716,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { view_path.span, id, is_public, - if shadowable == Shadowable::Never { - Shadowable::Glob - } else { - shadowable - }); + shadowable); } } }