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_trait_selection/src/traits/select/mod.rs | |
| parent | ef55a0a92f3cb6572ef67d99f4aefbdeb7b6b804 (diff) | |
| download | rust-3e14b684dd31794e8dbe6acd7a5f132997ee0c47.tar.gz rust-3e14b684dd31794e8dbe6acd7a5f132997ee0c47.zip | |
Change ty.kind to a method
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/select/mod.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index dbceb998371..4258d8e3010 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -1307,7 +1307,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { ); let tcx = self.infcx.tcx; - let predicates = match placeholder_trait_predicate.trait_ref.self_ty().kind { + let predicates = match *placeholder_trait_predicate.trait_ref.self_ty().kind() { ty::Projection(ref data) => { tcx.projection_predicates(data.item_def_id).subst(tcx, data.substs) } @@ -1566,7 +1566,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { // NOTE: binder moved to (*) let self_ty = self.infcx.shallow_resolve(obligation.predicate.skip_binder().self_ty()); - match self_ty.kind { + match self_ty.kind() { ty::Infer(ty::IntVar(_) | ty::FloatVar(_)) | ty::Uint(_) | ty::Int(_) @@ -1621,7 +1621,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { use self::BuiltinImplConditions::{Ambiguous, None, Where}; - match self_ty.kind { + match self_ty.kind() { ty::Infer(ty::IntVar(_)) | ty::Infer(ty::FloatVar(_)) | ty::FnDef(..) @@ -1695,7 +1695,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { /// Zed<i32> where enum Zed { A(T), B(u32) } -> [i32, u32] /// ``` fn constituent_types_for_ty(&self, t: Ty<'tcx>) -> Vec<Ty<'tcx>> { - match t.kind { + match *t.kind() { ty::Uint(_) | ty::Int(_) | ty::Bool | 
