From 913ab1ec0ad10873134ca429c1496806a9261206 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 14 Sep 2019 13:25:05 +0200 Subject: Resolve assoc types on type parameters E.g. `fn foo() -> 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. --- crates/ra_hir/src/ty/tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir/src/ty/tests.rs') 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() { [147; 148) 't': T [178; 180) '{}': () [191; 236) '{ ...(S); }': () - [201; 202) 'x': {unknown} - [205; 209) 'foo1': fn foo1(T) -> {unknown} - [205; 212) 'foo1(S)': {unknown} + [201; 202) 'x': u32 + [205; 209) 'foo1': fn foo1(T) -> ::Item + [205; 212) 'foo1(S)': u32 [210; 211) 'S': S [222; 223) 'y': u32 [226; 230) 'foo2': fn foo2(T) -> ::Item -- cgit v1.2.3