diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-15 07:50:36 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-15 07:50:36 +0100 |
commit | 8de56ec43e44ee227617de27ba8eddc328a90f5d (patch) | |
tree | 81f3523f2d78ac65697489a3ca43c03a768d05bc /crates/ra_hir/src/ty/lower.rs | |
parent | c4e2e36e4c3cdaf5243a4d481221804e2d71bc8e (diff) | |
parent | c8284d8424691dc348af8708abfc2172b7dd5dc5 (diff) |
Merge #1532
1532: Some refactorings & update Chalk r=flodiebold a=flodiebold
This does some of the renamings proposed in #1515, refactors `InferenceContext` a bit, and does a Cargo update, including fixing the build since I broke it by already pushing an updated branch to my Chalk fork :disappointed:
We could also consider switching back to Chalk master; I couldn't reproduce any hangs with the floundering even on the rustc repo...
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r-- | crates/ra_hir/src/ty/lower.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs index ca47d6e96..894ba0695 100644 --- a/crates/ra_hir/src/ty/lower.rs +++ b/crates/ra_hir/src/ty/lower.rs | |||
@@ -317,7 +317,10 @@ pub(crate) fn type_for_field(db: &impl HirDatabase, field: StructField) -> Ty { | |||
317 | Ty::from_hir(db, &resolver, type_ref) | 317 | Ty::from_hir(db, &resolver, type_ref) |
318 | } | 318 | } |
319 | 319 | ||
320 | pub(crate) fn trait_env(db: &impl HirDatabase, resolver: &Resolver) -> Arc<super::Environment> { | 320 | pub(crate) fn trait_env( |
321 | db: &impl HirDatabase, | ||
322 | resolver: &Resolver, | ||
323 | ) -> Arc<super::TraitEnvironment> { | ||
321 | let predicates = resolver | 324 | let predicates = resolver |
322 | .where_predicates_in_scope() | 325 | .where_predicates_in_scope() |
323 | .map(|pred| { | 326 | .map(|pred| { |
@@ -326,7 +329,7 @@ pub(crate) fn trait_env(db: &impl HirDatabase, resolver: &Resolver) -> Arc<super | |||
326 | }) | 329 | }) |
327 | .collect::<Vec<_>>(); | 330 | .collect::<Vec<_>>(); |
328 | 331 | ||
329 | Arc::new(super::Environment { predicates }) | 332 | Arc::new(super::TraitEnvironment { predicates }) |
330 | } | 333 | } |
331 | 334 | ||
332 | /// Resolve the where clause(s) of an item with generics. | 335 | /// Resolve the where clause(s) of an item with generics. |