mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-15 08:23:26 +00:00
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.
This commit is contained in:
parent
6366631721
commit
f53314cd70
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user