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
This commit is contained in:
Josh Stone 2020-08-20 10:07:30 -07:00 committed by GitHub
commit 16b9b9017a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -406,7 +406,7 @@ impl Visitor<'tcx> for ExtraComments<'tcx> {
self.super_const(constant);
let ty::Const { ty, val, .. } = constant;
match ty.kind {
ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char => {}
ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char | ty::Float(_) => {}
// Unit type
ty::Tuple(tys) if tys.is_empty() => {}
ty::FnDef(..) => {}

View File

@ -12,9 +12,6 @@
- _0 = Baz { x: move _2, y: const 0f32, z: const false }; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
+ (_0.0: usize) = move _2; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
+ (_0.1: f32) = const 0f32; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
// ty::Const
// + ty: f32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/deaggregator_test.rs:9:20: 9:23
// + literal: Const { ty: f32, val: Value(Scalar(0x00000000)) }