This fixes issues with RustAnalyzer not finding stable_mir crate. It is also part of the long term architecture plan for these crates, since we are moving towards having stable_mir depend on rustc_smir and not the other way around. I believe this is an utility function that will come handy eventually for stable_mir users, but I'm keeping it as part of rustc_internal since it initializes the StableMir context and requires `TyCtxt`. Finally, I added the rustc_internal crate under a feature since the APIs from this module shall not be stabilized.
11 lines
639 B
Rust
11 lines
639 B
Rust
//! We've temporarily moved the `stable_mir` implementation to [`rustc_smir::stable_mir`],
|
|
//! during refactoring to break the circular dependency between `rustc_smir` and `stable_mir`,
|
|
//!
|
|
//! This is a transitional measure as described in [PR #139319](https://github.com/rust-lang/rust/pull/139319).
|
|
//! Once the refactoring is complete, the `stable_mir` implementation will be moved back here.
|
|
|
|
/// Export the rustc_internal APIs. Note that this module has no stability
|
|
/// guarantees and it is not taken into account for semver.
|
|
#[cfg(feature = "rustc_internal")]
|
|
pub use rustc_smir::rustc_internal;
|
|
pub use rustc_smir::stable_mir::*;
|