Skip to content

Commit

Permalink
Suppress ty::Float in MIR comments of ty::Const
Browse files Browse the repository at this point in the history
Already covered by MIR constant comments
  • Loading branch information
tesuji committed Aug 20, 2020
1 parent 5fff382 commit d97bbd3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/util/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(..) => {}
Expand Down
3 changes: 0 additions & 3 deletions src/test/mir-opt/deaggregator_test.bar.Deaggregator.diff
Original file line number Diff line number Diff line change
Expand Up @@ -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)) }
Expand Down

0 comments on commit d97bbd3

Please sign in to comment.