aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-06-27 12:54:16 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-06-27 12:54:16 +0100
commitc31bffa99b1a7007572637228bd99c00362ae597 (patch)
treecf51a44cf731fab61d68da36e65b5c939cfed566 /gcc
parentb9fffb15587d4e45796e1ac1b230119f38f10662 (diff)
downloadgcc-c31bffa99b1a7007572637228bd99c00362ae597.zip
gcc-c31bffa99b1a7007572637228bd99c00362ae597.tar.gz
gcc-c31bffa99b1a7007572637228bd99c00362ae597.tar.bz2
move resolve-item functions into their associated file
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-item.cc23
-rw-r--r--gcc/rust/resolve/rust-ast-resolve.cc24
2 files changed, 23 insertions, 24 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-item.cc b/gcc/rust/resolve/rust-ast-resolve-item.cc
index 6c81274..5a21d57 100644
--- a/gcc/rust/resolve/rust-ast-resolve-item.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-item.cc
@@ -914,6 +914,28 @@ ResolveItem::visit (AST::ExternBlock &extern_block)
}
}
+void
+ResolveItem::resolve_impl_item (AST::TraitImplItem *item,
+ const CanonicalPath &prefix,
+ const CanonicalPath &canonical_prefix)
+{
+ ResolveImplItems::go (item, prefix, canonical_prefix);
+}
+
+void
+ResolveItem::resolve_impl_item (AST::InherentImplItem *item,
+ const CanonicalPath &prefix,
+ const CanonicalPath &canonical_prefix)
+{
+ ResolveImplItems::go (item, prefix, canonical_prefix);
+}
+
+void
+ResolveItem::resolve_extern_item (AST::ExternalItem *item)
+{
+ ResolveExternItem::go (item);
+}
+
static void
flatten_glob (const AST::UseTreeGlob &glob,
std::vector<AST::SimplePath> &paths);
@@ -1296,6 +1318,7 @@ rust_simple_path_resolve_test (void)
{
rust_use_dec_flattening ();
}
+
} // namespace selftest
#endif // CHECKING_P
diff --git a/gcc/rust/resolve/rust-ast-resolve.cc b/gcc/rust/resolve/rust-ast-resolve.cc
index 3a3deda..ff042bc 100644
--- a/gcc/rust/resolve/rust-ast-resolve.cc
+++ b/gcc/rust/resolve/rust-ast-resolve.cc
@@ -111,30 +111,6 @@ NameResolution::go (AST::Crate &crate)
resolver->pop_module_scope ();
}
-// rust-ast-resolve-item.h
-
-void
-ResolveItem::resolve_impl_item (AST::TraitImplItem *item,
- const CanonicalPath &prefix,
- const CanonicalPath &canonical_prefix)
-{
- ResolveImplItems::go (item, prefix, canonical_prefix);
-}
-
-void
-ResolveItem::resolve_impl_item (AST::InherentImplItem *item,
- const CanonicalPath &prefix,
- const CanonicalPath &canonical_prefix)
-{
- ResolveImplItems::go (item, prefix, canonical_prefix);
-}
-
-void
-ResolveItem::resolve_extern_item (AST::ExternalItem *item)
-{
- ResolveExternItem::go (item);
-}
-
// qualified path in type
bool