summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/mock-std/library
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/cargo/tests/testsuite/mock-std/library')
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/alloc/Cargo.toml8
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/alloc/src/lib.rs11
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/compiler_builtins/Cargo.toml5
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/compiler_builtins/src/lib.rs1
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/core/Cargo.toml5
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/core/src/lib.rs9
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/panic_unwind/Cargo.toml5
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/panic_unwind/src/lib.rs5
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/proc_macro/Cargo.toml5
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/proc_macro/src/lib.rs11
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/Cargo.toml11
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/lib.rs3
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-core/Cargo.toml11
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-core/lib.rs3
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-std/Cargo.toml11
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-std/lib.rs1
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/std/Cargo.toml11
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/std/src/lib.rs12
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/test/Cargo.toml18
-rw-r--r--src/tools/cargo/tests/testsuite/mock-std/library/test/src/lib.rs10
20 files changed, 156 insertions, 0 deletions
diff --git a/src/tools/cargo/tests/testsuite/mock-std/library/alloc/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/alloc/Cargo.toml
new file mode 100644
index 000000000..dc965abff
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/alloc/src/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/alloc/src/lib.rs
new file mode 100644
index 000000000..823716e40
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/compiler_builtins/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/compiler_builtins/Cargo.toml
new file mode 100644
index 000000000..d1df281d6
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/compiler_builtins/src/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/compiler_builtins/src/lib.rs
new file mode 100644
index 000000000..65e2cc340
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/mock-std/library/compiler_builtins/src/lib.rs
@@ -0,0 +1 @@
+// intentionally blank
diff --git a/src/tools/cargo/tests/testsuite/mock-std/library/core/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/core/Cargo.toml
new file mode 100644
index 000000000..3f7de53db
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/core/src/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/core/src/lib.rs
new file mode 100644
index 000000000..b90ed0914
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/panic_unwind/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/panic_unwind/Cargo.toml
new file mode 100644
index 000000000..e7beb923f
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/panic_unwind/src/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/panic_unwind/src/lib.rs
new file mode 100644
index 000000000..6af65d875
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/proc_macro/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/proc_macro/Cargo.toml
new file mode 100644
index 000000000..939a113b2
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/proc_macro/src/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/proc_macro/src/lib.rs
new file mode 100644
index 000000000..82a768406
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/Cargo.toml
new file mode 100644
index 000000000..6b86f22ca
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/lib.rs
new file mode 100644
index 000000000..2bbfa1a49
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-alloc/lib.rs
@@ -0,0 +1,3 @@
+#![no_std]
+
+pub use alloc::*;
diff --git a/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-core/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-core/Cargo.toml
new file mode 100644
index 000000000..8d1921600
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-core/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-core/lib.rs
new file mode 100644
index 000000000..816251790
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-core/lib.rs
@@ -0,0 +1,3 @@
+#![no_std]
+
+pub use core::*;
diff --git a/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-std/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-std/Cargo.toml
new file mode 100644
index 000000000..91572b815
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-std/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-std/lib.rs
new file mode 100644
index 000000000..f40d09caf
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/mock-std/library/rustc-std-workspace-std/lib.rs
@@ -0,0 +1 @@
+pub use std::*;
diff --git a/src/tools/cargo/tests/testsuite/mock-std/library/std/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/std/Cargo.toml
new file mode 100644
index 000000000..d2cfdea39
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/std/src/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/std/src/lib.rs
new file mode 100644
index 000000000..146d4c42c
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/test/Cargo.toml b/src/tools/cargo/tests/testsuite/mock-std/library/test/Cargo.toml
new file mode 100644
index 000000000..299db7bfd
--- /dev/null
+++ b/src/tools/cargo/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/src/tools/cargo/tests/testsuite/mock-std/library/test/src/lib.rs b/src/tools/cargo/tests/testsuite/mock-std/library/test/src/lib.rs
new file mode 100644
index 000000000..a112855f5
--- /dev/null
+++ b/src/tools/cargo/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() {
+}