Skip to content

Commit 16b9b90

Browse files
authored
Rollup merge of #75731 - lzutao:mir-cmts-suppress-float-ty-const, r=oli-obk
Suppress ty::Float in MIR comments of ty::Const Already covered by MIR constant comments
2 parents 02b2f73 + d97bbd3 commit 16b9b90

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/librustc_mir/util/pretty.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 3 deletions
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)