From: Pierre-Emmanuel Patry <[email protected]>

Add an extern prelude crate test and a minimal core library.

gcc/testsuite/ChangeLog:

        * rust/minicore/extern_prelude_path.rs: New test.
        * rust/minicore/extern_prelude_path_core/lib.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/6b289249b51331e1640080ca90518ed85426a0d5

The commit has NOT been mentioned in any issue.

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4758

 gcc/testsuite/rust/minicore/extern_prelude_path.rs         | 7 +++++++
 .../rust/minicore/extern_prelude_path_core/lib.rs          | 4 ++++
 2 files changed, 11 insertions(+)
 create mode 100644 gcc/testsuite/rust/minicore/extern_prelude_path.rs
 create mode 100644 gcc/testsuite/rust/minicore/extern_prelude_path_core/lib.rs

diff --git a/gcc/testsuite/rust/minicore/extern_prelude_path.rs 
b/gcc/testsuite/rust/minicore/extern_prelude_path.rs
new file mode 100644
index 000000000..994611e2c
--- /dev/null
+++ b/gcc/testsuite/rust/minicore/extern_prelude_path.rs
@@ -0,0 +1,7 @@
+#![feature(no_std)]
+#![no_std]
+
+pub fn main() {
+    let _: crate::core::Titi = ::core::Titi;
+    let _: ::core::Titi = crate::core::Titi;
+}
diff --git a/gcc/testsuite/rust/minicore/extern_prelude_path_core/lib.rs 
b/gcc/testsuite/rust/minicore/extern_prelude_path_core/lib.rs
new file mode 100644
index 000000000..210881f59
--- /dev/null
+++ b/gcc/testsuite/rust/minicore/extern_prelude_path_core/lib.rs
@@ -0,0 +1,4 @@
+#![feature(no_core)]
+#![no_core]
+
+pub struct Titi;
-- 
2.55.0

Reply via email to