diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-08-03 00:49:11 +0200 | 
|---|---|---|
| committer | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-09-04 17:47:51 +0200 | 
| commit | 3e14b684dd31794e8dbe6acd7a5f132997ee0c47 (patch) | |
| tree | 04430a32c809ca7644bbe9ae281735b4671154b8 /compiler/rustc_mir/src/util/pretty.rs | |
| parent | ef55a0a92f3cb6572ef67d99f4aefbdeb7b6b804 (diff) | |
| download | rust-3e14b684dd31794e8dbe6acd7a5f132997ee0c47.tar.gz rust-3e14b684dd31794e8dbe6acd7a5f132997ee0c47.zip | |
Change ty.kind to a method
Diffstat (limited to 'compiler/rustc_mir/src/util/pretty.rs')
| -rw-r--r-- | compiler/rustc_mir/src/util/pretty.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/compiler/rustc_mir/src/util/pretty.rs b/compiler/rustc_mir/src/util/pretty.rs index db57766620e..54bc248bc5b 100644 --- a/compiler/rustc_mir/src/util/pretty.rs +++ b/compiler/rustc_mir/src/util/pretty.rs @@ -398,7 +398,7 @@ impl Visitor<'tcx> for ExtraComments<'tcx> { fn visit_constant(&mut self, constant: &Constant<'tcx>, location: Location) { self.super_constant(constant, location); let Constant { span, user_ty, literal } = constant; - match literal.ty.kind { + match literal.ty.kind() { ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char => {} // Unit type ty::Tuple(tys) if tys.is_empty() => {} @@ -416,7 +416,7 @@ impl Visitor<'tcx> for ExtraComments<'tcx> { fn visit_const(&mut self, constant: &&'tcx ty::Const<'tcx>, _: Location) { self.super_const(constant); let ty::Const { ty, val, .. } = constant; - match ty.kind { + match ty.kind() { ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char | ty::Float(_) => {} // Unit type ty::Tuple(tys) if tys.is_empty() => {} | 
