@@ -12,13 +12,13 @@ use rustc_middle::ty::{self, TyCtxt};
1212use crate :: rustc_smir:: { Stable , Tables } ;
1313
1414/// Builds a monomorphic body for a given instance.
15- pub struct BodyBuilder < ' tcx > {
15+ pub ( crate ) struct BodyBuilder < ' tcx > {
1616 tcx : TyCtxt < ' tcx > ,
1717 instance : ty:: Instance < ' tcx > ,
1818}
1919
2020impl < ' tcx > BodyBuilder < ' tcx > {
21- pub fn new ( tcx : TyCtxt < ' tcx > , instance : ty:: Instance < ' tcx > ) -> Self {
21+ pub ( crate ) fn new ( tcx : TyCtxt < ' tcx > , instance : ty:: Instance < ' tcx > ) -> Self {
2222 let instance = match instance. def {
2323 // To get the fallback body of an intrinsic, we need to convert it to an item.
2424 ty:: InstanceKind :: Intrinsic ( def_id) => ty:: Instance :: new ( def_id, instance. args ) ,
@@ -30,7 +30,7 @@ impl<'tcx> BodyBuilder<'tcx> {
3030 /// Build a stable monomorphic body for a given instance based on the MIR body.
3131 ///
3232 /// All constants are also evaluated.
33- pub fn build ( mut self , tables : & mut Tables < ' tcx > ) -> stable_mir:: mir:: Body {
33+ pub ( crate ) fn build ( mut self , tables : & mut Tables < ' tcx > ) -> stable_mir:: mir:: Body {
3434 let body = tables. tcx . instance_mir ( self . instance . def ) . clone ( ) ;
3535 let mono_body = if !self . instance . args . is_empty ( )
3636 // Without the `generic_const_exprs` feature gate, anon consts in signatures do not
0 commit comments