Skip to content

Commit d97bbd3

Browse files
committed
Suppress ty::Float in MIR comments of ty::Const
Already covered by MIR constant comments
1 parent 5fff382 commit d97bbd3

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/librustc_mir/util/pretty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ impl Visitor<'tcx> for ExtraComments<'tcx> {
406406
self.super_const(constant);
407407
let ty::Const { ty, val, .. } = constant;
408408
match ty.kind {
409-
ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char => {}
409+
ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char | ty::Float(_) => {}
410410
// Unit type
411411
ty::Tuple(tys) if tys.is_empty() => {}
412412
ty::FnDef(..) => {}

src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
- _0 = Baz { x: move _2, y: const 0f32, z: const false }; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
1313
+ (_0.0: usize) = move _2; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
1414
+ (_0.1: f32) = const 0f32; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
15-
// ty::Const
16-
// + ty: f32
17-
// + val: Value(Scalar(0x00000000))
1815
// mir::Constant
1916
// + span: $DIR/deaggregator_test.rs:9:20: 9:23
2017
// + literal: Const { ty: f32, val: Value(Scalar(0x00000000)) }

0 commit comments

Comments
 (0)