]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ich/impls_ty.rs
Merge remote-tracking branch 'origin/master' into gen
[rust.git] / src / librustc / ich / impls_ty.rs
index 8a37d7bab4445c9314b23a49ce04aeb20132aa78..22364c2c43a366812dfffac7511afbfe205ba2a2 100644 (file)
@@ -147,6 +147,11 @@ fn hash_stable<W: StableHasherResult>(&self,
     }
 }
 
+impl_stable_hash_for!(struct ty::GenSig<'tcx> {
+    yield_ty,
+    return_ty
+});
+
 impl_stable_hash_for!(struct ty::FnSig<'tcx> {
     inputs_and_output,
     variadic,
@@ -321,6 +326,8 @@ fn hash_stable<W: StableHasherResult>(&self,
 
 impl_stable_hash_for!(struct ty::ClosureSubsts<'tcx> { substs });
 
+impl_stable_hash_for!(struct ty::GeneratorInterior<'tcx> { witness });
+
 impl_stable_hash_for!(struct ty::GenericPredicates<'tcx> {
     parent,
     predicates
@@ -546,6 +553,12 @@ fn hash_stable<W: StableHasherResult>(&self,
                 def_id.hash_stable(hcx, hasher);
                 closure_substs.hash_stable(hcx, hasher);
             }
+            TyGenerator(def_id, closure_substs, interior)
+             => {
+                def_id.hash_stable(hcx, hasher);
+                closure_substs.hash_stable(hcx, hasher);
+                interior.hash_stable(hcx, hasher);
+            }
             TyTuple(inner_tys, from_diverging_type_var) => {
                 inner_tys.hash_stable(hcx, hasher);
                 from_diverging_type_var.hash_stable(hcx, hasher);
@@ -626,6 +639,8 @@ fn hash_stable<W: StableHasherResult>(&self,
             ref upvar_capture_map,
             ref closure_tys,
             ref closure_kinds,
+            ref generator_interiors,
+            ref generator_sigs,
             ref liberated_fn_sigs,
             ref fru_field_types,
 
@@ -655,6 +670,8 @@ fn hash_stable<W: StableHasherResult>(&self,
 
             ich::hash_stable_nodemap(hcx, hasher, closure_tys);
             ich::hash_stable_nodemap(hcx, hasher, closure_kinds);
+            ich::hash_stable_nodemap(hcx, hasher, generator_interiors);
+            ich::hash_stable_nodemap(hcx, hasher, generator_sigs);
             ich::hash_stable_nodemap(hcx, hasher, liberated_fn_sigs);
             ich::hash_stable_nodemap(hcx, hasher, fru_field_types);
             ich::hash_stable_nodemap(hcx, hasher, cast_kinds);
@@ -683,6 +700,7 @@ fn hash_stable<W: StableHasherResult>(&self,
     TupleSimplifiedType(size),
     TraitSimplifiedType(def_id),
     ClosureSimplifiedType(def_id),
+    GeneratorSimplifiedType(def_id),
     AnonSimplifiedType(def_id),
     FunctionSimplifiedType(params),
     ParameterSimplifiedType