@@ -12,13 +12,13 @@ use rustc_middle::ty::{self, TyCtxt};
12
12
use crate :: rustc_smir:: { Stable , Tables } ;
13
13
14
14
/// Builds a monomorphic body for a given instance.
15
- pub struct BodyBuilder < ' tcx > {
15
+ pub ( crate ) struct BodyBuilder < ' tcx > {
16
16
tcx : TyCtxt < ' tcx > ,
17
17
instance : ty:: Instance < ' tcx > ,
18
18
}
19
19
20
20
impl < ' 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 {
22
22
let instance = match instance. def {
23
23
// To get the fallback body of an intrinsic, we need to convert it to an item.
24
24
ty:: InstanceKind :: Intrinsic ( def_id) => ty:: Instance :: new ( def_id, instance. args ) ,
@@ -30,7 +30,7 @@ impl<'tcx> BodyBuilder<'tcx> {
30
30
/// Build a stable monomorphic body for a given instance based on the MIR body.
31
31
///
32
32
/// 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 {
34
34
let body = tables. tcx . instance_mir ( self . instance . def ) . clone ( ) ;
35
35
let mono_body = if !self . instance . args . is_empty ( )
36
36
// Without the `generic_const_exprs` feature gate, anon consts in signatures do not
0 commit comments