]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: collect-lang-items: Display attribute upon error finding it
authorArthur Cohen <arthur.cohen@embecosm.com>
Fri, 3 Jan 2025 15:45:39 +0000 (15:45 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:56:57 +0000 (12:56 +0100)
gcc/rust/ChangeLog:

* ast/rust-collect-lang-items.cc (get_lang_item_attr): Show unknown attribute upon error.

gcc/rust/ast/rust-collect-lang-items.cc

index 50d134a429f514171f0845cce8d8919adf7dd0c7..168123ee56eb740ff91d6bd3d88af0f5b5b4faba 100644 (file)
@@ -36,7 +36,8 @@ get_lang_item_attr (const T &maybe_lang_item)
       const auto &str_path = attr.get_path ().as_string ();
       if (!Analysis::Attributes::is_known (str_path))
        {
-         rust_error_at (attr.get_locus (), "unknown attribute");
+         rust_error_at (attr.get_locus (), "unknown attribute %qs",
+                        str_path.c_str ());
          continue;
        }