Skip to content

Commit f53314c

Browse files
committed
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.
1 parent 6366631 commit f53314c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/librustc_resolve/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,6 @@ impl Rib {
345345
#[deriving(Show,PartialEq,Clone,Copy)]
346346
enum Shadowable {
347347
Always,
348-
/// Means that the recorded import obeys the glob shadowing rules, i.e., can
349-
/// only be shadowed by another glob import.
350-
Glob,
351348
Never
352349
}
353350

@@ -1719,11 +1716,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
17191716
view_path.span,
17201717
id,
17211718
is_public,
1722-
if shadowable == Shadowable::Never {
1723-
Shadowable::Glob
1724-
} else {
1725-
shadowable
1726-
});
1719+
shadowable);
17271720
}
17281721
}
17291722
}

0 commit comments

Comments
 (0)