summaryrefslogtreecommitdiffstats
path: root/tests/testsuite/mock-std/library
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:47:55 +0000
commit2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4 (patch)
tree033cc839730fda84ff08db877037977be94e5e3a /tests/testsuite/mock-std/library
parentInitial commit. (diff)
downloadcargo-upstream.tar.xz
cargo-upstream.zip
Adding upstream version 0.70.1+ds1.upstream/0.70.1+ds1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/testsuite/mock-std/library')
-rw-r--r--tests/testsuite/mock-std/library/alloc/Cargo.toml8
-rw-r--r--tests/testsuite/mock-std/library/alloc/src/lib.rs11
-rw-r--r--tests/testsuite/mock-std/library/compiler_builtins/Cargo.toml5
-rw-r--r--tests/testsuite/mock-std/library/compiler_builtins/src/lib.rs1
-rw-r--r--tests/testsuite/mock-std/library/core/Cargo.toml5
-rw-r--r--tests/testsuite/mock-std/library/core/src/lib.rs9
-rw-r--r--tests/testsuite/mock-std/library/panic_unwind/Cargo.toml5
-rw-r--r--tests/testsuite/mock-std/library/panic_unwind/src/lib.rs5
-rw-r--r--tests/testsuite/mock-std/library/proc_macro/Cargo.toml5
-rw-r--r--tests/testsuite/mock-std/library/proc_macro/src/lib.rs11
-rw-r--r--tests/testsuite/mock-std/library/rustc-std-workspace-alloc/Cargo.toml11
-rw-r--r--tests/testsuite/mock-std/library/rustc-std-workspace-alloc/lib.rs3
-rw-r--r--tests/testsuite/mock-std/library/rustc-std-workspace-core/Cargo.toml11
-rw-r--r--tests/testsuite/mock-std/library/rustc-std-workspace-core/lib.rs3
-rw-r--r--tests/testsuite/mock-std/library/rustc-std-workspace-std/Cargo.toml11
-rw-r--r--tests/testsuite/mock-std/library/rustc-std-workspace-std/lib.rs1
-rw-r--r--tests/testsuite/mock-std/library/std/Cargo.toml11
-rw-r--r--tests/testsuite/mock-std/library/std/src/lib.rs12
-rw-r--r--tests/testsuite/mock-std/library/test/Cargo.toml18
-rw-r--r--tests/testsuite/mock-std/library/test/src/lib.rs10
20 files changed, 156 insertions, 0 deletions
diff --git a/tests/testsuite/mock-std/library/alloc/Cargo.toml b/tests/testsuite/mock-std/library/alloc/Cargo.toml
new file mode 100644
index 0000000..dc965ab
--- /dev/null
+++ b/tests/testsuite/mock-std/library/alloc/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "alloc"
+version = "0.1.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
+
+[dependencies]
+registry-dep-using-core = { version = "*", features = ['mockbuild'] }
diff --git a/tests/testsuite/mock-std/library/alloc/src/lib.rs b/tests/testsuite/mock-std/library/alloc/src/lib.rs
new file mode 100644
index 0000000..823716e
--- /dev/null
+++ b/tests/testsuite/mock-std/library/alloc/src/lib.rs
@@ -0,0 +1,11 @@
+#![feature(staged_api)]
+#![stable(since = "1.0.0", feature = "dummy")]
+
+extern crate alloc;
+
+#[stable(since = "1.0.0", feature = "dummy")]
+pub use alloc::*;
+
+#[stable(since = "1.0.0", feature = "dummy")]
+pub fn custom_api() {
+}
diff --git a/tests/testsuite/mock-std/library/compiler_builtins/Cargo.toml b/tests/testsuite/mock-std/library/compiler_builtins/Cargo.toml
new file mode 100644
index 0000000..d1df281
--- /dev/null
+++ b/tests/testsuite/mock-std/library/compiler_builtins/Cargo.toml
@@ -0,0 +1,5 @@
+[package]
+name = "compiler_builtins"
+version = "0.1.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
diff --git a/tests/testsuite/mock-std/library/compiler_builtins/src/lib.rs b/tests/testsuite/mock-std/library/compiler_builtins/src/lib.rs
new file mode 100644
index 0000000..65e2cc3
--- /dev/null
+++ b/tests/testsuite/mock-std/library/compiler_builtins/src/lib.rs
@@ -0,0 +1 @@
+// intentionally blank
diff --git a/tests/testsuite/mock-std/library/core/Cargo.toml b/tests/testsuite/mock-std/library/core/Cargo.toml
new file mode 100644
index 0000000..3f7de53
--- /dev/null
+++ b/tests/testsuite/mock-std/library/core/Cargo.toml
@@ -0,0 +1,5 @@
+[package]
+name = "core"
+version = "0.1.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
diff --git a/tests/testsuite/mock-std/library/core/src/lib.rs b/tests/testsuite/mock-std/library/core/src/lib.rs
new file mode 100644
index 0000000..b90ed09
--- /dev/null
+++ b/tests/testsuite/mock-std/library/core/src/lib.rs
@@ -0,0 +1,9 @@
+#![feature(staged_api)]
+#![stable(since = "1.0.0", feature = "dummy")]
+
+#[stable(since = "1.0.0", feature = "dummy")]
+pub use core::*;
+
+#[stable(since = "1.0.0", feature = "dummy")]
+pub fn custom_api() {
+}
diff --git a/tests/testsuite/mock-std/library/panic_unwind/Cargo.toml b/tests/testsuite/mock-std/library/panic_unwind/Cargo.toml
new file mode 100644
index 0000000..e7beb92
--- /dev/null
+++ b/tests/testsuite/mock-std/library/panic_unwind/Cargo.toml
@@ -0,0 +1,5 @@
+[package]
+name = "panic_unwind"
+version = "0.1.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
diff --git a/tests/testsuite/mock-std/library/panic_unwind/src/lib.rs b/tests/testsuite/mock-std/library/panic_unwind/src/lib.rs
new file mode 100644
index 0000000..6af65d8
--- /dev/null
+++ b/tests/testsuite/mock-std/library/panic_unwind/src/lib.rs
@@ -0,0 +1,5 @@
+#![feature(panic_unwind, panic_runtime)]
+#![panic_runtime]
+#![no_std]
+
+extern crate panic_unwind;
diff --git a/tests/testsuite/mock-std/library/proc_macro/Cargo.toml b/tests/testsuite/mock-std/library/proc_macro/Cargo.toml
new file mode 100644
index 0000000..939a113
--- /dev/null
+++ b/tests/testsuite/mock-std/library/proc_macro/Cargo.toml
@@ -0,0 +1,5 @@
+[package]
+name = "proc_macro"
+version = "0.1.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
diff --git a/tests/testsuite/mock-std/library/proc_macro/src/lib.rs b/tests/testsuite/mock-std/library/proc_macro/src/lib.rs
new file mode 100644
index 0000000..82a7684
--- /dev/null
+++ b/tests/testsuite/mock-std/library/proc_macro/src/lib.rs
@@ -0,0 +1,11 @@
+#![feature(staged_api)]
+#![stable(since = "1.0.0", feature = "dummy")]
+
+extern crate proc_macro;
+
+#[stable(since = "1.0.0", feature = "dummy")]
+pub use proc_macro::*;
+
+#[stable(since = "1.0.0", feature = "dummy")]
+pub fn custom_api() {
+}
diff --git a/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/Cargo.toml b/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/Cargo.toml
new file mode 100644
index 0000000..6b86f22
--- /dev/null
+++ b/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "rustc-std-workspace-alloc"
+version = "1.9.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
+
+[lib]
+path = "lib.rs"
+
+[dependencies]
+alloc = { path = "../alloc" }
diff --git a/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/lib.rs b/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/lib.rs
new file mode 100644
index 0000000..2bbfa1a
--- /dev/null
+++ b/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/lib.rs
@@ -0,0 +1,3 @@
+#![no_std]
+
+pub use alloc::*;
diff --git a/tests/testsuite/mock-std/library/rustc-std-workspace-core/Cargo.toml b/tests/testsuite/mock-std/library/rustc-std-workspace-core/Cargo.toml
new file mode 100644
index 0000000..8d19216
--- /dev/null
+++ b/tests/testsuite/mock-std/library/rustc-std-workspace-core/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "rustc-std-workspace-core"
+version = "1.9.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
+
+[lib]
+path = "lib.rs"
+
+[dependencies]
+core = { path = "../core" }
diff --git a/tests/testsuite/mock-std/library/rustc-std-workspace-core/lib.rs b/tests/testsuite/mock-std/library/rustc-std-workspace-core/lib.rs
new file mode 100644
index 0000000..8162517
--- /dev/null
+++ b/tests/testsuite/mock-std/library/rustc-std-workspace-core/lib.rs
@@ -0,0 +1,3 @@
+#![no_std]
+
+pub use core::*;
diff --git a/tests/testsuite/mock-std/library/rustc-std-workspace-std/Cargo.toml b/tests/testsuite/mock-std/library/rustc-std-workspace-std/Cargo.toml
new file mode 100644
index 0000000..91572b8
--- /dev/null
+++ b/tests/testsuite/mock-std/library/rustc-std-workspace-std/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "rustc-std-workspace-std"
+version = "1.9.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
+
+[lib]
+path = "lib.rs"
+
+[dependencies]
+std = { path = "../std" }
diff --git a/tests/testsuite/mock-std/library/rustc-std-workspace-std/lib.rs b/tests/testsuite/mock-std/library/rustc-std-workspace-std/lib.rs
new file mode 100644
index 0000000..f40d09c
--- /dev/null
+++ b/tests/testsuite/mock-std/library/rustc-std-workspace-std/lib.rs
@@ -0,0 +1 @@
+pub use std::*;
diff --git a/tests/testsuite/mock-std/library/std/Cargo.toml b/tests/testsuite/mock-std/library/std/Cargo.toml
new file mode 100644
index 0000000..d2cfdea
--- /dev/null
+++ b/tests/testsuite/mock-std/library/std/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "std"
+version = "0.1.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
+
+[dependencies]
+registry-dep-using-alloc = { version = "*", features = ['mockbuild'] }
+
+[features]
+feature1 = []
diff --git a/tests/testsuite/mock-std/library/std/src/lib.rs b/tests/testsuite/mock-std/library/std/src/lib.rs
new file mode 100644
index 0000000..146d4c4
--- /dev/null
+++ b/tests/testsuite/mock-std/library/std/src/lib.rs
@@ -0,0 +1,12 @@
+#![feature(staged_api)]
+#![stable(since = "1.0.0", feature = "dummy")]
+
+#[stable(since = "1.0.0", feature = "dummy")]
+pub use std::*;
+
+#[stable(since = "1.0.0", feature = "dummy")]
+pub fn custom_api() {}
+
+#[cfg(feature = "feature1")]
+#[stable(since = "1.0.0", feature = "dummy")]
+pub fn conditional_function() {}
diff --git a/tests/testsuite/mock-std/library/test/Cargo.toml b/tests/testsuite/mock-std/library/test/Cargo.toml
new file mode 100644
index 0000000..299db7b
--- /dev/null
+++ b/tests/testsuite/mock-std/library/test/Cargo.toml
@@ -0,0 +1,18 @@
+[package]
+name = "test"
+version = "0.1.0"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
+
+[dependencies]
+proc_macro = { path = "../proc_macro" }
+std = { path = "../std" }
+panic_unwind = { path = "../panic_unwind" }
+compiler_builtins = { path = "../compiler_builtins" }
+registry-dep-using-std = { version = "*", features = ['mockbuild'] }
+
+[features]
+panic-unwind = []
+backtrace = []
+feature1 = ["std/feature1"]
+default = []
diff --git a/tests/testsuite/mock-std/library/test/src/lib.rs b/tests/testsuite/mock-std/library/test/src/lib.rs
new file mode 100644
index 0000000..a112855
--- /dev/null
+++ b/tests/testsuite/mock-std/library/test/src/lib.rs
@@ -0,0 +1,10 @@
+#![feature(staged_api)]
+#![feature(test)]
+#![unstable(feature = "test", issue = "none")]
+
+extern crate test;
+
+pub use test::*;
+
+pub fn custom_api() {
+}