Skip to content

Commit 3c5bdfa

Browse files
committed
Fix a few comment and logging typos
1 parent 71bb5cd commit 3c5bdfa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc_mir/transform/const_prop.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
643643
value: Const<'tcx>,
644644
source_info: SourceInfo,
645645
) {
646-
trace!("attepting to replace {:?} with {:?}", rval, value);
646+
trace!("attempting to replace {:?} with {:?}", rval, value);
647647
if let Err(e) = self.ecx.validate_operand(
648648
value,
649649
vec![],
@@ -654,8 +654,9 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
654654
return;
655655
}
656656

657-
// FIXME> figure out what tho do when try_read_immediate fails
657+
// FIXME: figure out what tho do when try_read_immediate fails
658658
let imm = self.use_ecx(source_info, |this| this.ecx.try_read_immediate(value));
659+
debug!("Read value {:?} as immediate {:?}", value, imm);
659660

660661
if let Some(Ok(imm)) = imm {
661662
match *imm {
@@ -670,7 +671,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
670671
ScalarMaybeUndef::Scalar(one),
671672
ScalarMaybeUndef::Scalar(two),
672673
) => {
673-
// Found a value represented as a pair. For now only do cont-prop if type of
674+
// Found a value represented as a pair. For now only do const-prop if type of
674675
// Rvalue is also a pair with two scalars. The more general case is more
675676
// complicated to implement so we'll do it later.
676677
let ty = &value.layout.ty.kind;

0 commit comments

Comments
 (0)