aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-hir-dump.cc
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2023-06-30 00:44:52 +0200
committerPhilip Herron <philip.herron@embecosm.com>2023-06-30 17:15:14 +0000
commitec0c3ad30d2fc188dea1de1722f7a8601afe0671 (patch)
tree552efd2bb69a223f29633c1eb7981a26b0db33e0 /gcc/rust/hir/rust-hir-dump.cc
parentf044da10735895f0da58c68eb42eba8ac9c82b89 (diff)
downloadgcc-ec0c3ad30d2fc188dea1de1722f7a8601afe0671.zip
gcc-ec0c3ad30d2fc188dea1de1722f7a8601afe0671.tar.gz
gcc-ec0c3ad30d2fc188dea1de1722f7a8601afe0671.tar.bz2
gccrs: refactor: make crate.items private
Introduce Crate::get_items () and fixup all callers. gcc/rust/ChangeLog: * hir/tree/rust-hir.h (struct Crate): Rename struct into ... (class Crate): ... class, and add get_items. * backend/rust-compile.cc (CompileCrate::go): Adapt to visibility change of items. * checks/errors/privacy/rust-privacy-check.cc (Resolver::resolve): Likewise. * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::go): Likewise. * checks/errors/privacy/rust-pub-restricted-visitor.cc (PubRestrictedVisitor::go): Likewise. * checks/errors/privacy/rust-visibility-resolver.cc (VisibilityResolver::go): Likewise. * checks/errors/rust-const-checker.cc (ConstChecker::go): Likewise. * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::go): Likewise. * checks/lints/rust-lint-marklive.cc (FindEntryPoint::find): Likewise. * checks/lints/rust-lint-scan-deadcode.h (ScanDeadCode::Scan): Likewise. * metadata/rust-export-metadata.cc (PublicInterface::gather_export_data): Likewise. * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): Likewise. * hir/rust-hir-dump.cc (CompileCrate::go): Likewise. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Diffstat (limited to 'gcc/rust/hir/rust-hir-dump.cc')
-rw-r--r--gcc/rust/hir/rust-hir-dump.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc
index 5f3db42..f421f2d 100644
--- a/gcc/rust/hir/rust-hir-dump.cc
+++ b/gcc/rust/hir/rust-hir-dump.cc
@@ -46,7 +46,7 @@ Dump::go (HIR::Crate &crate)
stream << "items: [";
stream << indentation;
- for (const auto &item : crate.items)
+ for (const auto &item : crate.get_items ())
{
stream << std::endl;
item->accept_vis (*this);