From 9b784c352bad4626ab4f15935d27f2a81866527b Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Wed, 15 Jan 2025 12:58:53 +0000 Subject: 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. --- gcc/rust/hir/rust-hir-dump.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc') 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 -- cgit v1.1