aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-07-05 17:49:04 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-07-10 21:36:09 +0100
commitdefb583203923bf4edeb0531e85fa28de5015ecb (patch)
tree7ab54899ba077da5d417b43520d12039fcbc5127 /gcc/rust/resolve/rust-ast-resolve.cc
parent7ebf5d62d208f52d8b63824165ae830c190d91b5 (diff)
downloadgcc-defb583203923bf4edeb0531e85fa28de5015ecb.zip
gcc-defb583203923bf4edeb0531e85fa28de5015ecb.tar.gz
gcc-defb583203923bf4edeb0531e85fa28de5015ecb.tar.bz2
Add support for TypeAliases on Traits
This is the initial support for associated types, by creating placeholder types for each trait type alias. When it comes to checking for compatibility we are missing the piece to ensure that the type is defintly the same as the associated type. Addresses #471 #456
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve.cc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve.cc b/gcc/rust/resolve/rust-ast-resolve.cc
index b568e1c..18047db 100644
--- a/gcc/rust/resolve/rust-ast-resolve.cc
+++ b/gcc/rust/resolve/rust-ast-resolve.cc
@@ -619,5 +619,21 @@ ResolveType::visit (AST::ArrayType &type)
ResolveExpr::go (type.get_size_expr ().get (), type.get_node_id ());
}
+// rust-ast-resolve-item.h
+
+void
+ResolveItem::resolve_impl_item (AST::TraitImplItem *item,
+ const CanonicalPath &self)
+{
+ ResolveImplItems::go (item, self);
+}
+
+void
+ResolveItem::resolve_impl_item (AST::InherentImplItem *item,
+ const CanonicalPath &self)
+{
+ ResolveImplItems::go (item, self);
+}
+
} // namespace Resolver
} // namespace Rust