diff options
| author | Celina G. Val <celinval@amazon.com> | 2025-04-30 15:39:52 -0700 |
|---|---|---|
| committer | Celina G. Val <celinval@amazon.com> | 2025-04-30 15:39:52 -0700 |
| commit | 0f81fca8ec623e849225a254ef6f639963ff54c0 (patch) | |
| tree | cb542d18ff166088fa67cb4aa23acc95425714d8 /compiler/rustc_driver_impl | |
| parent | 7188f453111502962326022740e2657fce0a6939 (diff) | |
| download | rust-0f81fca8ec623e849225a254ef6f639963ff54c0.tar.gz rust-0f81fca8ec623e849225a254ef6f639963ff54c0.zip | |
Change rustc_driver dependency on stable_mir crate
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.
Diffstat (limited to 'compiler/rustc_driver_impl')
| -rw-r--r-- | compiler/rustc_driver_impl/Cargo.toml | 2 | ||||
| -rw-r--r-- | compiler/rustc_driver_impl/src/pretty.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_driver_impl/Cargo.toml b/compiler/rustc_driver_impl/Cargo.toml index c823d11126e..9da4f2dbc27 100644 --- a/compiler/rustc_driver_impl/Cargo.toml +++ b/compiler/rustc_driver_impl/Cargo.toml @@ -44,13 +44,13 @@ rustc_privacy = { path = "../rustc_privacy" } rustc_query_system = { path = "../rustc_query_system" } rustc_resolve = { path = "../rustc_resolve" } rustc_session = { path = "../rustc_session" } -rustc_smir = { path = "../rustc_smir" } rustc_span = { path = "../rustc_span" } rustc_target = { path = "../rustc_target" } rustc_trait_selection = { path = "../rustc_trait_selection" } rustc_ty_utils = { path = "../rustc_ty_utils" } serde_json = "1.0.59" shlex = "1.0" +stable_mir = { path = "../stable_mir", features = ["rustc_internal"] } tracing = { version = "0.1.35" } # tidy-alphabetical-end diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs index 16d70af7e05..ec77043cd12 100644 --- a/compiler/rustc_driver_impl/src/pretty.rs +++ b/compiler/rustc_driver_impl/src/pretty.rs @@ -10,8 +10,8 @@ use rustc_middle::ty::{self, TyCtxt}; use rustc_mir_build::thir::print::{thir_flat, thir_tree}; use rustc_session::Session; use rustc_session::config::{OutFileName, PpHirMode, PpMode, PpSourceMode}; -use rustc_smir::rustc_internal::pretty::write_smir_pretty; use rustc_span::{FileName, Ident}; +use stable_mir::rustc_internal::pretty::write_smir_pretty; use tracing::debug; use {rustc_ast as ast, rustc_hir_pretty as pprust_hir}; |
