|
10 | 10 | use crate::rustc_internal::{self, opaque}; |
11 | 11 | use crate::stable_mir::mir::{CopyNonOverlapping, UserTypeProjection, VariantIdx}; |
12 | 12 | use crate::stable_mir::ty::{ |
13 | | - allocation_filter, new_allocation, Const, FloatTy, GenericParamDef, IntTy, Movability, RigidTy, |
| 13 | + allocation_filter, new_allocation, FloatTy, GenericParamDef, IntTy, Movability, RigidTy, |
14 | 14 | TyKind, UintTy, |
15 | 15 | }; |
16 | 16 | use crate::stable_mir::{self, Context}; |
@@ -205,8 +205,7 @@ impl<'tcx> Stable<'tcx> for mir::Rvalue<'tcx> { |
205 | 205 | match self { |
206 | 206 | Use(op) => stable_mir::mir::Rvalue::Use(op.stable(tables)), |
207 | 207 | Repeat(op, len) => { |
208 | | - let cnst = ConstantKind::from_const(*len, tables.tcx); |
209 | | - let len = Const { literal: cnst.stable(tables) }; |
| 208 | + let len = len.stable(tables); |
210 | 209 | stable_mir::mir::Rvalue::Repeat(op.stable(tables), len) |
211 | 210 | } |
212 | 211 | Ref(region, kind, place) => stable_mir::mir::Rvalue::Ref( |
@@ -394,8 +393,7 @@ impl<'tcx> Stable<'tcx> for ty::TermKind<'tcx> { |
394 | 393 | match self { |
395 | 394 | ty::TermKind::Ty(ty) => TermKind::Type(tables.intern_ty(*ty)), |
396 | 395 | ty::TermKind::Const(cnst) => { |
397 | | - let cnst = ConstantKind::from_const(*cnst, tables.tcx); |
398 | | - let cnst = Const { literal: cnst.stable(tables) }; |
| 396 | + let cnst = cnst.stable(tables); |
399 | 397 | TermKind::Const(cnst) |
400 | 398 | } |
401 | 399 | } |
|
0 commit comments