Skip to content

Commit 25fab7e

Browse files
committed
Rename in librustc_codegen_ssa.
1 parent c671252 commit 25fab7e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/librustc_codegen_ssa/mir/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
1414
constant: &mir::Constant<'tcx>,
1515
) -> Result<&'tcx ty::Const<'tcx>, ErrorHandled> {
1616
match constant.literal.val {
17-
mir::interpret::ConstValue::Unevaluated(def_id, ref substs) => {
17+
ty::ConstKind::Unevaluated(def_id, ref substs) => {
1818
let substs = self.monomorphize(substs);
1919
let instance = ty::Instance::resolve(
2020
self.cx.tcx(), ty::ParamEnv::reveal_all(), def_id, substs,

src/librustc_codegen_ssa/mir/operand.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
7575
return OperandRef::new_zst(bx, layout);
7676
}
7777

78-
let val = match val.val {
79-
ConstValue::Unevaluated(..) => bug!("unevaluated constant in `OperandRef::from_const`"),
80-
ConstValue::Param(_) => bug!("encountered a ConstValue::Param in codegen"),
81-
ConstValue::Infer(_) => bug!("encountered a ConstValue::Infer in codegen"),
82-
ConstValue::Bound(..) => bug!("encountered a ConstValue::Bound in codegen"),
83-
ConstValue::Placeholder(_) => bug!("encountered a ConstValue::Placeholder in codegen"),
78+
let val_val = match val.val {
79+
ty::ConstKind::Value(val_val) => val_val,
80+
_ => bug!("encountered bad ConstKind in codegen"),
81+
};
82+
83+
let val = match val_val {
8484
ConstValue::Scalar(x) => {
8585
let scalar = match layout.abi {
8686
layout::Abi::Scalar(ref x) => x,

src/librustc_codegen_ssa/mir/place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
480480
let layout = cx.layout_of(self.monomorphize(&ty));
481481
match bx.tcx().const_eval(param_env.and(cid)) {
482482
Ok(val) => match val.val {
483-
mir::interpret::ConstValue::ByRef { alloc, offset } => {
483+
ty::ConstKind::Value(mir::interpret::ConstValue::ByRef { alloc, offset }) => {
484484
bx.cx().from_const_alloc(layout, alloc, offset)
485485
}
486486
_ => bug!("promoteds should have an allocation: {:?}", val),

0 commit comments

Comments
 (0)