summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_smir/src/very_unstable.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /compiler/rustc_smir/src/very_unstable.rs
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_smir/src/very_unstable.rs')
-rw-r--r--compiler/rustc_smir/src/very_unstable.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/compiler/rustc_smir/src/very_unstable.rs b/compiler/rustc_smir/src/very_unstable.rs
new file mode 100644
index 000000000..12ba133db
--- /dev/null
+++ b/compiler/rustc_smir/src/very_unstable.rs
@@ -0,0 +1,27 @@
+//! This module reexports various crates and modules from unstable rustc APIs.
+//! Add anything you need here and it will get slowly transferred to a stable API.
+//! Only use rustc_smir in your dependencies and use the reexports here instead of
+//! directly referring to the unstable crates.
+
+macro_rules! crates {
+ ($($rustc_name:ident -> $name:ident,)*) => {
+ $(
+ #[cfg(not(feature = "default"))]
+ pub extern crate $rustc_name as $name;
+ #[cfg(feature = "default")]
+ pub use $rustc_name as $name;
+ )*
+ }
+}
+
+crates! {
+ rustc_borrowck -> borrowck,
+ rustc_driver -> driver,
+ rustc_hir -> hir,
+ rustc_interface -> interface,
+ rustc_middle -> middle,
+ rustc_mir_dataflow -> dataflow,
+ rustc_mir_transform -> transform,
+ rustc_serialize -> serialize,
+ rustc_trait_selection -> trait_selection,
+}