From: Arthur Cohen Date: Wed, 15 Jan 2025 12:58:53 +0000 (+0000) Subject: gccrs: hir-dump: Improve handling of typepathsegments that are lang items. X-Git-Tag: basepoints/gcc-16~826 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b784c352bad4626ab4f15935d27f2a81866527b;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc index 798179d172e..0bfcc97afe7 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