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]>
Tested on x86_64-pc-linux-gnu.
---
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 00000000000..994611e2ce9
--- /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 00000000000..210881f5964
--- /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