diff options
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-resolve-path.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc index de325fa..ffc2655 100644 --- a/gcc/rust/backend/rust-compile-resolve-path.cc +++ b/gcc/rust/backend/rust-compile-resolve-path.cc @@ -84,7 +84,7 @@ ResolvePathRef::visit (HIR::PathInExpression &expr) CompileItem::compile (resolved_item, ctx); if (!ctx->lookup_function_decl (ref, &fn)) { - rust_error_at (expr.get_locus (), "forward decl was not compiled"); + rust_error_at (expr.get_locus (), "forward decl was not compiled 1"); return; } } @@ -112,12 +112,14 @@ ResolvePathType::visit (HIR::PathInExpression &expr) return; } - // assumes paths are functions for now - if (!ctx->lookup_compiled_types (ref, &resolved)) + TyTy::BaseType *tyty = nullptr; + if (!ctx->get_tyctx ()->lookup_type (ref, &tyty)) { - rust_error_at (expr.get_locus (), "forward decl was not compiled"); + rust_error_at (expr.get_locus (), "unknown type"); return; } + + resolved = TyTyResolveCompile::compile (ctx, tyty); } } // namespace Compile |