diff options
author | Florian Diebold <[email protected]> | 2019-09-14 12:25:05 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-09-17 18:47:45 +0100 |
commit | 913ab1ec0ad10873134ca429c1496806a9261206 (patch) | |
tree | 877db00b9898b278d9c9213824f9472d640de360 /crates/ra_hir/src/ty/tests.rs | |
parent | 16ee779483a1d96ccd2258b43c8477744773b314 (diff) |
Resolve assoc types on type parameters
E.g. `fn foo<T: Iterator>() -> T::Item`. It seems that rustc does this only for
type parameters and only based on their bounds, so we also only consider traits
from bounds.
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index b5d3c0180..dc4e8683d 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -2732,9 +2732,9 @@ fn test() { | |||
2732 | [147; 148) 't': T | 2732 | [147; 148) 't': T |
2733 | [178; 180) '{}': () | 2733 | [178; 180) '{}': () |
2734 | [191; 236) '{ ...(S); }': () | 2734 | [191; 236) '{ ...(S); }': () |
2735 | [201; 202) 'x': {unknown} | 2735 | [201; 202) 'x': u32 |
2736 | [205; 209) 'foo1': fn foo1<S>(T) -> {unknown} | 2736 | [205; 209) 'foo1': fn foo1<S>(T) -> <T as Iterable>::Item |
2737 | [205; 212) 'foo1(S)': {unknown} | 2737 | [205; 212) 'foo1(S)': u32 |
2738 | [210; 211) 'S': S | 2738 | [210; 211) 'S': S |
2739 | [222; 223) 'y': u32 | 2739 | [222; 223) 'y': u32 |
2740 | [226; 230) 'foo2': fn foo2<S>(T) -> <T as Iterable>::Item | 2740 | [226; 230) 'foo2': fn foo2<S>(T) -> <T as Iterable>::Item |