aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2025-01-22 12:37:58 +0000
committerCohenArthur <arthur.cohen@embecosm.com>2025-01-28 17:35:37 +0000
commite6a2ce133f88bb5ba9a8a146170a9bbd3e9d77ed (patch)
tree64d9f8492e8f02281c526dddd8bd88a7b284cf8b /gcc
parent33d901d12755e16ee70ace5c9afc07e9aac0c4af (diff)
downloadgcc-e6a2ce133f88bb5ba9a8a146170a9bbd3e9d77ed.zip
gcc-e6a2ce133f88bb5ba9a8a146170a9bbd3e9d77ed.tar.gz
gcc-e6a2ce133f88bb5ba9a8a146170a9bbd3e9d77ed.tar.bz2
mappings: Improve error message for get_lang_item_node
gcc/rust/ChangeLog: * util/rust-hir-map.cc (Mappings::get_lang_item_node): Better formatting when a lang item does not exist when it should.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/util/rust-hir-map.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/util/rust-hir-map.cc b/gcc/rust/util/rust-hir-map.cc
index 4d29272..99839eb 100644
--- a/gcc/rust/util/rust-hir-map.cc
+++ b/gcc/rust/util/rust-hir-map.cc
@@ -1305,8 +1305,8 @@ Mappings::get_lang_item_node (LangItem::Kind item_type)
if (auto lookup = lookup_lang_item_node (item_type))
return *lookup;
- rust_fatal_error (UNKNOWN_LOCATION, "failed to find lang item %qs",
- LangItem::ToString (item_type).c_str ());
+ rust_fatal_error (UNKNOWN_LOCATION, "undeclared lang item: %qs",
+ LangItem::PrettyString (item_type).c_str ());
}
void