Skip to content

Commit b0551a4

Browse files
committed
fix glob-shadowing.rs fail
1 parent 5fe5036 commit b0551a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_resolve/src/access_levels.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl<'r, 'a> AccessLevelsVisitor<'r, 'a> {
8080
false => AccessLevel::Public
8181
};
8282

83-
if let Some(def_id) = binding.res().opt_def_id().and_then(|id| id.as_local()) {
83+
if let Some(def_id) = binding.res().opt_def_id().and_then(|id| id.as_local()) && !binding.is_ambiguity(){
8484
let vis = match binding.vis {
8585
Visibility::Public => Visibility::Public,
8686
Visibility::Restricted(id) => Visibility::Restricted(id.expect_local())

0 commit comments

Comments
 (0)