diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-02-25 15:21:34 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-03-01 10:35:07 +0000 |
commit | ec9ead44a40ee68de7fc39e32a47662c44281deb (patch) | |
tree | 72af294bf6f54e4becebb22a860823f12aed062c /gcc/rust/backend/rust-compile-resolve-path.cc | |
parent | 9af2ae0ff91535da104db0d3828d863770439fad (diff) | |
download | gcc-ec9ead44a40ee68de7fc39e32a47662c44281deb.zip gcc-ec9ead44a40ee68de7fc39e32a47662c44281deb.tar.gz gcc-ec9ead44a40ee68de7fc39e32a47662c44281deb.tar.bz2 |
Adds the same support from generic structs in #235 onto tuple structs
Type binding still not supported here but the same generic support is added
to tuples.
Fixes #236
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-resolve-path.cc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc index ffc2655..1a798ee 100644 --- a/gcc/rust/backend/rust-compile-resolve-path.cc +++ b/gcc/rust/backend/rust-compile-resolve-path.cc @@ -93,34 +93,5 @@ ResolvePathRef::visit (HIR::PathInExpression &expr) = ctx->get_backend ()->function_code_expression (fn, expr.get_locus ()); } -void -ResolvePathType::visit (HIR::PathInExpression &expr) -{ - // need to look up the reference for this identifier - NodeId ref_node_id; - if (!ctx->get_resolver ()->lookup_resolved_type ( - expr.get_mappings ().get_nodeid (), &ref_node_id)) - { - return; - } - - HirId ref; - if (!ctx->get_mappings ()->lookup_node_to_hir ( - expr.get_mappings ().get_crate_num (), ref_node_id, &ref)) - { - rust_error_at (expr.get_locus (), "reverse lookup failure"); - return; - } - - TyTy::BaseType *tyty = nullptr; - if (!ctx->get_tyctx ()->lookup_type (ref, &tyty)) - { - rust_error_at (expr.get_locus (), "unknown type"); - return; - } - - resolved = TyTyResolveCompile::compile (ctx, tyty); -} - } // namespace Compile } // namespace Rust |