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/monomorphize/polymorphize.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/monomorphize/polymorphize.rs')
| -rw-r--r-- | compiler/rustc_mir/src/monomorphize/polymorphize.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir/src/monomorphize/polymorphize.rs b/compiler/rustc_mir/src/monomorphize/polymorphize.rs index 69f3288ee39..3f6f117acdc 100644 --- a/compiler/rustc_mir/src/monomorphize/polymorphize.rs +++ b/compiler/rustc_mir/src/monomorphize/polymorphize.rs @@ -288,7 +288,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> { return false; } - match ty.kind { + match *ty.kind() { ty::Closure(def_id, substs) | ty::Generator(def_id, substs, ..) => { debug!("visit_ty: def_id={:?}", def_id); // Avoid cycle errors with generators. @@ -337,7 +337,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for HasUsedGenericParams<'a> { return false; } - match ty.kind { + match ty.kind() { ty::Param(param) => !self.unused_parameters.contains(param.index).unwrap_or(false), _ => ty.super_visit_with(self), } |
