Add WIP stable MIR crate
This commit is contained in:
commit
3e0c1c8e0c
10
Cargo.toml
Normal file
10
Cargo.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "rustc_smir"
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
rustc_middle = { path = "../rustc_middle" }
|
||||
rustc_driver = { path = "../rustc_driver" }
|
||||
rustc_borrowck = { path = "../rustc_borrowck" }
|
||||
rustc_interface = { path = "../rustc_interface" }
|
10
src/lib.rs
Normal file
10
src/lib.rs
Normal file
@ -0,0 +1,10 @@
|
||||
//! The WIP stable interface to rustc internals.
|
||||
|
||||
#![doc(
|
||||
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
|
||||
test(attr(allow(unused_variables), deny(warnings)))
|
||||
)]
|
||||
|
||||
pub mod mir;
|
||||
|
||||
pub mod very_unstable;
|
10
src/mir.rs
Normal file
10
src/mir.rs
Normal file
@ -0,0 +1,10 @@
|
||||
pub use rustc_middle::mir::{
|
||||
visit::MutVisitor, AggregateKind, AssertKind, BasicBlock, BasicBlockData, BinOp, BindingForm,
|
||||
BlockTailInfo, Body, BorrowKind, CastKind, ClearCrossCrate, Constant, ConstantKind,
|
||||
CopyNonOverlapping, Coverage, FakeReadCause, Field, GeneratorInfo, ImplicitSelfKind,
|
||||
InlineAsmOperand, Local, LocalDecl, LocalInfo, LocalKind, Location, MirPhase, MirSource,
|
||||
NullOp, Operand, Place, PlaceRef, ProjectionElem, ProjectionKind, Promoted, RetagKind, Rvalue,
|
||||
Safety, SourceInfo, SourceScope, SourceScopeData, SourceScopeLocalData, Statement,
|
||||
StatementKind, UnOp, UserTypeProjection, UserTypeProjections, VarBindingForm, VarDebugInfo,
|
||||
VarDebugInfoContents,
|
||||
};
|
9
src/very_unstable.rs
Normal file
9
src/very_unstable.rs
Normal file
@ -0,0 +1,9 @@
|
||||
//! 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.
|
||||
|
||||
pub use rustc_borrowck as borrowck;
|
||||
pub use rustc_driver as driver;
|
||||
pub use rustc_interface as interface;
|
||||
pub use rustc_middle as middle;
|
Loading…
Reference in New Issue
Block a user