diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-02-13 19:38:36 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-04-23 23:01:19 +0200 |
| commit | 423a712a16233277e22fec707d9aca8a0a83aa2d (patch) | |
| tree | 2ab4c5dd1f1d494d3867e2628114a73ba3275b8f /compiler/rustc_resolve/src | |
| parent | daccecc0ecc344c43413fd499026bf6c6248bebc (diff) | |
| download | rust-423a712a16233277e22fec707d9aca8a0a83aa2d.tar.gz rust-423a712a16233277e22fec707d9aca8a0a83aa2d.zip | |
Fix lints.
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/build_reduced_graph.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/build_reduced_graph.rs b/compiler/rustc_resolve/src/build_reduced_graph.rs index 8dade5f87ee..3cb38d94009 100644 --- a/compiler/rustc_resolve/src/build_reduced_graph.rs +++ b/compiler/rustc_resolve/src/build_reduced_graph.rs @@ -458,6 +458,14 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> { let mut source = module_path.pop().unwrap(); let mut type_ns_only = false; + self.r.visibilities.insert(self.r.local_def_id(id), vis); + if id1 != ast::DUMMY_NODE_ID { + self.r.visibilities.insert(self.r.local_def_id(id1), vis); + } + if id2 != ast::DUMMY_NODE_ID { + self.r.visibilities.insert(self.r.local_def_id(id2), vis); + } + if nested { // Correctly handle `self` if source.ident.name == kw::SelfLower { @@ -564,7 +572,6 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> { additional_ids: (id1, id2), }; - self.r.visibilities.insert(self.r.local_def_id(id), vis); self.add_import( module_path, kind, |
