diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-11-29 11:06:25 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-21 12:33:13 +0100 |
commit | c7c6b5f89a39a39322aefb6e8f181c5fc230b162 (patch) | |
tree | 598cee8f91edc494f6fc0b95e8738064ce1c1475 /gcc/rust/resolve | |
parent | 70c87e94e11d97dc63d6ffa4862bd4f97c5f25ba (diff) | |
download | gcc-c7c6b5f89a39a39322aefb6e8f181c5fc230b162.zip gcc-c7c6b5f89a39a39322aefb6e8f181c5fc230b162.tar.gz gcc-c7c6b5f89a39a39322aefb6e8f181c5fc230b162.tar.bz2 |
gccrs: hir: Lower lang-item paths
gcc/rust/ChangeLog:
* hir/rust-ast-lower-type.cc (ASTLowerTypePath::translate): Adapt to
handle lang item paths.
(ASTLowerTypePath::visit): Likewise.
(ASTLowerTypePath::translate_type_path): New.
(ASTLowerTypePath::translate_lang_item_type_path): New.
* hir/rust-ast-lower-type.h: Adapt to handle lang item paths.
* resolve/rust-ast-resolve-type.h: Likewise.
Diffstat (limited to 'gcc/rust/resolve')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve-type.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.h b/gcc/rust/resolve/rust-ast-resolve-type.h index 7c3831a..518c0d8 100644 --- a/gcc/rust/resolve/rust-ast-resolve-type.h +++ b/gcc/rust/resolve/rust-ast-resolve-type.h @@ -71,13 +71,13 @@ public: { auto &type = static_cast<AST::LangItemPath &> (type_path); - rust_debug ("[ARTHUR]: lang item kind: %s", - LangItem::ToString (type.get_lang_item_kind ()).c_str ()); - auto lang_item = Analysis::Mappings::get () .lookup_lang_item_node (type.get_lang_item_kind ()) .value (); + auto resolver = Resolver::get (); + resolver->insert_resolved_type (type.get_node_id (), lang_item); + return lang_item; } |