diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-12-04 15:09:58 +0100 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2024-12-09 14:46:13 +0000 |
commit | d2025fe536db08effbe6b82bca8eeec67a55f4a4 (patch) | |
tree | a8fa730713db3fce81ec037927cbb226c36b298f /gcc/rust/ast/rust-ast.cc | |
parent | b1273464c26b0f99f373889806b97786f54dc0bc (diff) | |
download | gcc-d2025fe536db08effbe6b82bca8eeec67a55f4a4.zip gcc-d2025fe536db08effbe6b82bca8eeec67a55f4a4.tar.gz gcc-d2025fe536db08effbe6b82bca8eeec67a55f4a4.tar.bz2 |
ast: Add LangItemPath class
This commit adds a new kind of Path, changes the base Path class and turns TypePath
into a child of the base Path class.
gcc/rust/ChangeLog:
* ast/rust-path.h (class LangItemPath): New.
(class TypePath): Adapt to accomodate LangItemPath.
* ast/rust-ast.cc (TraitImpl::as_string): Use new checks for lang items.
(QualifiedPathType::as_string): Likewise.
(FormatArgs::set_outer_attrs): Likewise.
* ast/rust-item.h (class TraitImpl): Likewise.
Diffstat (limited to 'gcc/rust/ast/rust-ast.cc')
-rw-r--r-- | gcc/rust/ast/rust-ast.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc index 27e62a9..09e71bc 100644 --- a/gcc/rust/ast/rust-ast.cc +++ b/gcc/rust/ast/rust-ast.cc @@ -1299,7 +1299,7 @@ TraitImpl::as_string () const else str += "false"; - str += "\n TypePath (to trait): " + trait_path.as_string (); + str += "\n TypePath (to trait): " + trait_path->as_string (); str += "\n Type (struct to impl on): " + trait_type->as_string (); @@ -1561,7 +1561,7 @@ QualifiedPathType::as_string () const str += type_to_invoke_on->as_string (); if (has_as_clause ()) - str += " as " + trait_path.as_string (); + str += " as " + trait_path->as_string (); return str + ">"; } |