diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2024-10-10 00:46:01 -0400 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-19 15:32:16 +0100 |
commit | b05e174a34799f5a24235ff5d553387963c41da4 (patch) | |
tree | 2f7a8cbfb5935172381e7b1a7054cc0790f570c6 /gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | |
parent | e71b4d671a71588c0fd7d6833bbec539e82562e3 (diff) | |
download | gcc-b05e174a34799f5a24235ff5d553387963c41da4.zip gcc-b05e174a34799f5a24235ff5d553387963c41da4.tar.gz gcc-b05e174a34799f5a24235ff5d553387963c41da4.tar.bz2 |
gccrs: Handle TypeAlias during toplevel resolution 2.0
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::visit): Handle TypeAlias.
* resolve/rust-toplevel-name-resolver-2.0.h
(TopLevel::visit): Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove type-alias1.rs.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc')
-rw-r--r-- | gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc index 35732e2..b0e0c1b 100644 --- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc +++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc @@ -348,6 +348,15 @@ TopLevel::visit (AST::ConstantItem &const_item) DefaultResolver::visit (const_item); } +void +TopLevel::visit (AST::TypeAlias &type_item) +{ + insert_or_error_out (type_item.get_new_type_name (), type_item, + Namespace::Types); + + DefaultResolver::visit (type_item); +} + static void flatten_rebind ( const AST::UseTreeRebind &glob, |