diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-03 13:17:58 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-03 13:17:58 +0100 |
commit | bac73ade7f73d9b7bafaf369a0b206a4ffea73dd (patch) | |
tree | ddd1737a8e3f46fb8757bad1d8024469d3bf0a89 /crates/ra_hir/src/ty/infer.rs | |
parent | 1c0672b7f802c7e7814ba9a1b3b21ecf866343d6 (diff) | |
parent | b8c1e402fa3a40c7e979750d60d7b003f9cb7b0d (diff) |
Merge #1757
1757: Assoc type bindings r=flodiebold a=flodiebold
This adds support for type bindings (bounds like `where T: Iterator<Item = u32>`).
It doesn't yet work in as many situations as I'd like because of some [Chalk problems](https://github.com/rust-lang/chalk/issues/234). But it works in some situations, and will at least not bitrot this way ;)
(part of the problem is that we use `Normalize` to normalize associated types, but produce `ProjectionEq` goals from where clauses, so Chalk can't normalize using the environment; this would be fixed by using `ProjectionEq` for normalization, which I think is the 'proper' way, but then we'd run into those ambiguity problems everywhere...)
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/infer.rs')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index b89a40b4b..ec3b7ffef 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -30,7 +30,7 @@ use super::{ | |||
30 | autoderef, lower, method_resolution, op, primitive, | 30 | autoderef, lower, method_resolution, op, primitive, |
31 | traits::{Guidance, Obligation, ProjectionPredicate, Solution}, | 31 | traits::{Guidance, Obligation, ProjectionPredicate, Solution}, |
32 | ApplicationTy, CallableDef, InEnvironment, ProjectionTy, Substs, TraitEnvironment, TraitRef, | 32 | ApplicationTy, CallableDef, InEnvironment, ProjectionTy, Substs, TraitEnvironment, TraitRef, |
33 | Ty, TypableDef, TypeCtor, | 33 | Ty, TypableDef, TypeCtor, TypeWalk, |
34 | }; | 34 | }; |
35 | use crate::{ | 35 | use crate::{ |
36 | adt::VariantDef, | 36 | adt::VariantDef, |