diff options
| author | toidiu <toidiu@protonmail.com> | 2017-10-15 01:13:56 -0400 |
|---|---|---|
| committer | toidiu <toidiu@protonmail.com> | 2018-04-12 13:52:06 -0400 |
| commit | 6a229cbfac2c6ae8e1db4f8ae6320cac731a2c2a (patch) | |
| tree | 6dcee780529840544261b42aca2fef65cb840f19 /src/librustc/ich | |
| parent | 9afed646451175e24964cc76688293cb87ed718c (diff) | |
| download | rust-6a229cbfac2c6ae8e1db4f8ae6320cac731a2c2a.tar.gz rust-6a229cbfac2c6ae8e1db4f8ae6320cac731a2c2a.zip | |
Implement inferring outlives requirements for references, structs, enum, union, and projection types. added a feature gate and tests for these scenarios.
Diffstat (limited to 'src/librustc/ich')
| -rw-r--r-- | src/librustc/ich/impls_ty.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/librustc/ich/impls_ty.rs b/src/librustc/ich/impls_ty.rs index af4d3429bb1..41cfac2674b 100644 --- a/src/librustc/ich/impls_ty.rs +++ b/src/librustc/ich/impls_ty.rs @@ -1100,6 +1100,20 @@ impl<'a> HashStable<StableHashingContext<'a>> for ty::CrateVariancesMap { } } +impl<'a, 'gcx> HashStable<StableHashingContext<'a>> for ty::CratePredicatesMap<'gcx> { + fn hash_stable<W: StableHasherResult>(&self, + hcx: &mut StableHashingContext<'a>, + hasher: &mut StableHasher<W>) { + let ty::CratePredicatesMap { + ref predicates, + // This is just an irrelevant helper value. + empty_predicate: _, + } = *self; + + predicates.hash_stable(hcx, hasher); + } +} + impl_stable_hash_for!(struct ty::AssociatedItem { def_id, name, |
