Skip to content

Commit d681729

Browse files
committed
fix: rewrite some parts of rustc_smir::builder.rs
1 parent f835ab4 commit d681729

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_smir/src/rustc_smir/builder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ use rustc_middle::mir;
99
use rustc_middle::mir::visit::MutVisitor;
1010
use rustc_middle::ty::{self, TyCtxt};
1111

12-
use crate::rustc_smir::{Stable, Tables};
13-
use crate::stable_mir;
12+
use crate::rustc_smir::{Bridge, Tables};
1413

1514
/// Builds a monomorphic body for a given instance.
1615
pub(crate) struct BodyBuilder<'tcx> {
@@ -31,7 +30,7 @@ impl<'tcx> BodyBuilder<'tcx> {
3130
/// Build a stable monomorphic body for a given instance based on the MIR body.
3231
///
3332
/// All constants are also evaluated.
34-
pub(crate) fn build(mut self, tables: &mut Tables<'tcx>) -> stable_mir::mir::Body {
33+
pub(crate) fn build<B: Bridge>(mut self, tables: &mut Tables<'tcx, B>) -> mir::Body<'tcx> {
3534
let body = tables.tcx.instance_mir(self.instance.def).clone();
3635
let mono_body = if !self.instance.args.is_empty()
3736
// Without the `generic_const_exprs` feature gate, anon consts in signatures do not
@@ -50,7 +49,8 @@ impl<'tcx> BodyBuilder<'tcx> {
5049
// Already monomorphic.
5150
body
5251
};
53-
mono_body.stable(tables)
52+
53+
mono_body
5454
}
5555
}
5656

0 commit comments

Comments
 (0)