diff options
Diffstat (limited to 'gcc/rust/backend/rust-compile-context.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-context.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/gcc/rust/backend/rust-compile-context.cc b/gcc/rust/backend/rust-compile-context.cc index c80f956..86f0894 100644 --- a/gcc/rust/backend/rust-compile-context.cc +++ b/gcc/rust/backend/rust-compile-context.cc @@ -33,19 +33,8 @@ Context::Context () void Context::setup_builtins () { - auto builtins = resolver->get_builtin_types (); - for (auto it = builtins.begin (); it != builtins.end (); it++) - { - HirId ref; - bool ok = tyctx->lookup_type_by_node_id ((*it)->get_node_id (), &ref); - rust_assert (ok); - - TyTy::BaseType *lookup; - ok = tyctx->lookup_type (ref, &lookup); - rust_assert (ok); - - TyTyResolveCompile::compile (this, lookup); - } + for (auto &builtin : tyctx->get_builtins ()) + TyTyResolveCompile::compile (this, builtin.get ()); } hashval_t |