Skip to content

Commit 3e0c1c8

Browse files
committed
Add WIP stable MIR crate
0 parents  commit 3e0c1c8

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "rustc_smir"
3+
version = "0.0.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
rustc_middle = { path = "../rustc_middle" }
8+
rustc_driver = { path = "../rustc_driver" }
9+
rustc_borrowck = { path = "../rustc_borrowck" }
10+
rustc_interface = { path = "../rustc_interface" }

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//! The WIP stable interface to rustc internals.
2+
3+
#![doc(
4+
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
5+
test(attr(allow(unused_variables), deny(warnings)))
6+
)]
7+
8+
pub mod mir;
9+
10+
pub mod very_unstable;

src/mir.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pub use rustc_middle::mir::{
2+
visit::MutVisitor, AggregateKind, AssertKind, BasicBlock, BasicBlockData, BinOp, BindingForm,
3+
BlockTailInfo, Body, BorrowKind, CastKind, ClearCrossCrate, Constant, ConstantKind,
4+
CopyNonOverlapping, Coverage, FakeReadCause, Field, GeneratorInfo, ImplicitSelfKind,
5+
InlineAsmOperand, Local, LocalDecl, LocalInfo, LocalKind, Location, MirPhase, MirSource,
6+
NullOp, Operand, Place, PlaceRef, ProjectionElem, ProjectionKind, Promoted, RetagKind, Rvalue,
7+
Safety, SourceInfo, SourceScope, SourceScopeData, SourceScopeLocalData, Statement,
8+
StatementKind, UnOp, UserTypeProjection, UserTypeProjections, VarBindingForm, VarDebugInfo,
9+
VarDebugInfoContents,
10+
};

src/very_unstable.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//! This module reexports various crates and modules from unstable rustc APIs.
2+
//! Add anything you need here and it will get slowly transferred to a stable API.
3+
//! Only use rustc_smir in your dependencies and use the reexports here instead of
4+
//! directly referring to the unstable crates.
5+
6+
pub use rustc_borrowck as borrowck;
7+
pub use rustc_driver as driver;
8+
pub use rustc_interface as interface;
9+
pub use rustc_middle as middle;

0 commit comments

Comments
 (0)