aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2025-01-15 12:58:53 +0000
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-24 13:06:51 +0100
commit9b784c352bad4626ab4f15935d27f2a81866527b (patch)
tree2e5366749f7dadf52a64c9d5f7fcc1502822ce40 /gcc/rust/hir
parent1beda99b0336ec0e7bfba5395d5b47334b71b0bf (diff)
downloadgcc-9b784c352bad4626ab4f15935d27f2a81866527b.zip
gcc-9b784c352bad4626ab4f15935d27f2a81866527b.tar.gz
gcc-9b784c352bad4626ab4f15935d27f2a81866527b.tar.bz2
gccrs: hir-dump: Improve handling of typepathsegments that are lang items.
gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::do_typepathsegment): Add handling for lang items.
Diffstat (limited to 'gcc/rust/hir')
-rw-r--r--gcc/rust/hir/rust-hir-dump.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc
index 798179d..0bfcc97a 100644
--- a/gcc/rust/hir/rust-hir-dump.cc
+++ b/gcc/rust/hir/rust-hir-dump.cc
@@ -388,7 +388,10 @@ void
Dump::do_typepathsegment (TypePathSegment &e)
{
do_mappings (e.get_mappings ());
- put_field ("ident_segment", e.get_ident_segment ().as_string ());
+ if (e.is_lang_item ())
+ put_field ("ident_segment", LangItem::PrettyString (e.get_lang_item ()));
+ else
+ put_field ("ident_segment", e.get_ident_segment ().as_string ());
}
void