public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8591] gccrs: Allow enabling lang_items and no_core features
@ 2024-01-30 11:59 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-30 11:59 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bdbc24c36cad3dc26324c4d5ea38f8bd0f02c9a8

commit r14-8591-gbdbc24c36cad3dc26324c4d5ea38f8bd0f02c9a8
Author: Owen Avery <powerboat9.gamer@gmail.com>
Date:   Sat Dec 9 01:22:02 2023 -0500

    gccrs: Allow enabling lang_items and no_core features
    
    gcc/rust/ChangeLog:
    
            * checks/errors/rust-feature.cc
            (Feature::name_hash_map):
            Add entries for Name::LANG_ITEMS and Name::NO_CORE.
            * checks/errors/rust-feature.h
            (Feature::Name::LANG_ITEMS): New.
            (Feature::Name::NO_CORE): New.
    
    gcc/testsuite/ChangeLog:
    
            * rust/compile/sized-stub.rs: New test.
    
    Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>

Diff:
---
 gcc/rust/checks/errors/rust-feature.cc   | 2 ++
 gcc/rust/checks/errors/rust-feature.h    | 2 ++
 gcc/testsuite/rust/compile/sized-stub.rs | 6 ++++++
 3 files changed, 10 insertions(+)

diff --git a/gcc/rust/checks/errors/rust-feature.cc b/gcc/rust/checks/errors/rust-feature.cc
index 88649f14e603..c12710ae2e17 100644
--- a/gcc/rust/checks/errors/rust-feature.cc
+++ b/gcc/rust/checks/errors/rust-feature.cc
@@ -56,6 +56,8 @@ const std::map<std::string, Feature::Name> Feature::name_hash_map = {
   // later Rust versions
   {"optin_builtin_traits", Feature::Name::AUTO_TRAITS},
   {"extern_types", Feature::Name::EXTERN_TYPES},
+  {"lang_items", Feature::Name::LANG_ITEMS},
+  {"no_core", Feature::Name::NO_CORE},
 }; // namespace Rust
 
 tl::optional<Feature::Name>
diff --git a/gcc/rust/checks/errors/rust-feature.h b/gcc/rust/checks/errors/rust-feature.h
index 4ff059c61675..e6bc2362e39e 100644
--- a/gcc/rust/checks/errors/rust-feature.h
+++ b/gcc/rust/checks/errors/rust-feature.h
@@ -43,6 +43,8 @@ public:
     DECL_MACRO,
     AUTO_TRAITS,
     EXTERN_TYPES,
+    LANG_ITEMS,
+    NO_CORE,
   };
 
   const std::string &as_string () { return m_name_str; }
diff --git a/gcc/testsuite/rust/compile/sized-stub.rs b/gcc/testsuite/rust/compile/sized-stub.rs
new file mode 100644
index 000000000000..4e89b1fb134a
--- /dev/null
+++ b/gcc/testsuite/rust/compile/sized-stub.rs
@@ -0,0 +1,6 @@
+#![feature(lang_items)]
+#![feature(no_core)]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-30 11:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 11:59 [gcc r14-8591] gccrs: Allow enabling lang_items and no_core features Arthur Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).