]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: ast: Add LangItemPath class
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 4 Dec 2024 14:09:58 +0000 (15:09 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:33:12 +0000 (12:33 +0100)
commitc482c358e3a724c8e258a3fc58230b931dd64747
tree5d4427fc1f8c8ba507da2bd3443bdc9359a87934
parent588ded8766e16fe2e9c2a657935cde519dad454e
gccrs: 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.
gcc/rust/ast/rust-ast.cc
gcc/rust/ast/rust-item.h
gcc/rust/ast/rust-path.h