diff options
| author | Makai <m4kai410@gmail.com> | 2025-07-15 16:02:24 +0000 |
|---|---|---|
| committer | Makai <m4kai410@gmail.com> | 2025-07-18 18:49:12 +0000 |
| commit | 95338717f10b46dfac7ee8333672ede004ca212b (patch) | |
| tree | 0c644ed8307c9e409c628effa8a7617da78e24d2 | |
| parent | a1deaa7097aa92bfb184824faf30791c03d190f8 (diff) | |
| download | rust-95338717f10b46dfac7ee8333672ede004ca212b.tar.gz rust-95338717f10b46dfac7ee8333672ede004ca212b.zip | |
Update docs in `rustc_public_bridge`
| -rw-r--r-- | compiler/rustc_public_bridge/src/alloc.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_public_bridge/src/builder.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_public_bridge/src/context/impls.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_public_bridge/src/context/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_public_bridge/src/lib.rs | 6 |
5 files changed, 11 insertions, 12 deletions
diff --git a/compiler/rustc_public_bridge/src/alloc.rs b/compiler/rustc_public_bridge/src/alloc.rs index 4a4725390a0..ecf9004562c 100644 --- a/compiler/rustc_public_bridge/src/alloc.rs +++ b/compiler/rustc_public_bridge/src/alloc.rs @@ -1,4 +1,4 @@ -//! Internal memory allocator implementation for StableMIR. +//! Internal memory allocator implementation for rustc_public. //! //! This module handles all direct interactions with rustc queries and performs //! the actual memory allocations. The stable interface in `rustc_public::alloc` diff --git a/compiler/rustc_public_bridge/src/builder.rs b/compiler/rustc_public_bridge/src/builder.rs index 2141053d09a..ea7f37d72d0 100644 --- a/compiler/rustc_public_bridge/src/builder.rs +++ b/compiler/rustc_public_bridge/src/builder.rs @@ -1,8 +1,7 @@ -//! Logic required to produce a monomorphic stable body. +//! Logic required to produce a monomorphic body. //! -//! We first retrieve and monomorphize the rustc body representation, i.e., we generate a +//! We retrieve and monomorphize the rustc body representation, i.e., we generate a //! monomorphic body using internal representation. -//! After that, we convert the internal representation into a stable one. use rustc_hir::def::DefKind; use rustc_middle::mir; @@ -25,7 +24,7 @@ impl<'tcx> BodyBuilder<'tcx> { BodyBuilder { tcx, instance } } - /// Build a stable monomorphic body for a given instance based on the MIR body. + /// Build a monomorphic body for a given instance based on the MIR body. /// /// All constants are also evaluated. pub(crate) fn build(mut self) -> mir::Body<'tcx> { diff --git a/compiler/rustc_public_bridge/src/context/impls.rs b/compiler/rustc_public_bridge/src/context/impls.rs index 5637da9e5b1..612e44b56b1 100644 --- a/compiler/rustc_public_bridge/src/context/impls.rs +++ b/compiler/rustc_public_bridge/src/context/impls.rs @@ -1,4 +1,4 @@ -//! Implementation of StableMIR Context. +//! Implementation of CompilerCtxt. #![allow(rustc::usage_of_qualified_ty)] @@ -85,7 +85,7 @@ impl<'tcx, B: Bridge> CompilerCtxt<'tcx, B> { /// Return whether the item has a body defined by the user. /// /// Note that intrinsics may have a placeholder body that shouldn't be used in practice. - /// In StableMIR, we handle this case as if the body is not available. + /// In rustc_public, we handle this case as if the body is not available. pub(crate) fn item_has_body(&self, def_id: DefId) -> bool { let must_override = if let Some(intrinsic) = self.tcx.intrinsic(def_id) { intrinsic.must_be_overridden diff --git a/compiler/rustc_public_bridge/src/context/mod.rs b/compiler/rustc_public_bridge/src/context/mod.rs index b436319ae8b..857a2d4e26b 100644 --- a/compiler/rustc_public_bridge/src/context/mod.rs +++ b/compiler/rustc_public_bridge/src/context/mod.rs @@ -1,4 +1,4 @@ -//! Implementation of StableMIR Context. +//! Implementation of CompilerCtxt. #![allow(rustc::usage_of_qualified_ty)] @@ -19,7 +19,7 @@ pub use helpers::*; /// Provides direct access to rustc's internal queries. /// /// `CompilerInterface` must go through -/// this context to obtain rustc-level information. +/// this context to obtain internal information. pub struct CompilerCtxt<'tcx, B: Bridge> { pub tcx: TyCtxt<'tcx>, _marker: PhantomData<B>, diff --git a/compiler/rustc_public_bridge/src/lib.rs b/compiler/rustc_public_bridge/src/lib.rs index c0e1b6d4f51..dec3be70baf 100644 --- a/compiler/rustc_public_bridge/src/lib.rs +++ b/compiler/rustc_public_bridge/src/lib.rs @@ -1,6 +1,6 @@ -//! Crate that implements what will become the rustc side of Stable MIR. +//! Crate that implements what will become the rustc side of rustc_public. //! -//! This crate is responsible for building Stable MIR components from internal components. +//! This crate serves as a proxy for making calls to rustc queries. //! //! This crate is not intended to be invoked directly by users. //! This crate is the public API of rustc that will be invoked by the `rustc_public` crate. @@ -210,7 +210,7 @@ impl<'tcx, B: Bridge> Tables<'tcx, B> { } } -/// A trait defining types that are used to emulate StableMIR components, which is really +/// A trait defining types that are used to emulate rustc_public components, which is really /// useful when programming in rustc_public-agnostic settings. pub trait Bridge: Sized { type DefId: Copy + Debug + PartialEq + IndexedVal; |
