aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2025-01-22 12:37:58 +0000
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-24 13:06:54 +0100
commit14d04e93cf83d167c650709c9f09aa5267cf71c5 (patch)
tree41c58523dace7cd60a53e7243eaa03b46c6a0682 /gcc/rust
parentbff688808d263270ece98848ae1f4184775b041c (diff)
downloadgcc-14d04e93cf83d167c650709c9f09aa5267cf71c5.zip
gcc-14d04e93cf83d167c650709c9f09aa5267cf71c5.tar.gz
gcc-14d04e93cf83d167c650709c9f09aa5267cf71c5.tar.bz2
gccrs: 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/rust')
-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 39c3a98..e58f1a2 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