diff options
author | Florian Diebold <[email protected]> | 2019-08-25 12:57:03 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-09-03 13:00:35 +0100 |
commit | c4fcfa2b0d516b9790fa8abdf96bb2308657d60a (patch) | |
tree | 94ae979da298244b9a057b6eacf58875101535b0 /crates/ra_hir/src/ty | |
parent | 741e350d4b7c3561f242207541ac9d7cab6ce45f (diff) |
Properly format `impl Trait<Type = Foo>` types
It's a bit complicated because we basically have to 'undo' the desugaring, and
the result is very dependent on the specifics of the desugaring and will
probably produce weird results otherwise.
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index 3e743ef58..d92d4659b 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -3586,7 +3586,7 @@ fn test<T: Trait<Type = u32>>(x: T, y: impl Trait<Type = i64>) { | |||
3586 | [166; 169) '{t}': T | 3586 | [166; 169) '{t}': T |
3587 | [167; 168) 't': T | 3587 | [167; 168) 't': T |
3588 | [257; 258) 'x': T | 3588 | [257; 258) 'x': T |
3589 | [263; 264) 'y': impl Trait + | 3589 | [263; 264) 'y': impl Trait<Type = i64> |
3590 | [290; 398) '{ ...r>); }': () | 3590 | [290; 398) '{ ...r>); }': () |
3591 | [296; 299) 'get': fn get<T>(T) -> <T as Trait>::Type | 3591 | [296; 299) 'get': fn get<T>(T) -> <T as Trait>::Type |
3592 | [296; 302) 'get(x)': {unknown} | 3592 | [296; 302) 'get(x)': {unknown} |
@@ -3594,12 +3594,12 @@ fn test<T: Trait<Type = u32>>(x: T, y: impl Trait<Type = i64>) { | |||
3594 | [308; 312) 'get2': fn get2<{unknown}, S<{unknown}>>(T) -> U | 3594 | [308; 312) 'get2': fn get2<{unknown}, S<{unknown}>>(T) -> U |
3595 | [308; 315) 'get2(x)': {unknown} | 3595 | [308; 315) 'get2(x)': {unknown} |
3596 | [313; 314) 'x': T | 3596 | [313; 314) 'x': T |
3597 | [321; 324) 'get': fn get<impl Trait + >(T) -> <T as Trait>::Type | 3597 | [321; 324) 'get': fn get<impl Trait<Type = i64>>(T) -> <T as Trait>::Type |
3598 | [321; 327) 'get(y)': {unknown} | 3598 | [321; 327) 'get(y)': {unknown} |
3599 | [325; 326) 'y': impl Trait + | 3599 | [325; 326) 'y': impl Trait<Type = i64> |
3600 | [333; 337) 'get2': fn get2<{unknown}, S<{unknown}>>(T) -> U | 3600 | [333; 337) 'get2': fn get2<{unknown}, S<{unknown}>>(T) -> U |
3601 | [333; 340) 'get2(y)': {unknown} | 3601 | [333; 340) 'get2(y)': {unknown} |
3602 | [338; 339) 'y': impl Trait + | 3602 | [338; 339) 'y': impl Trait<Type = i64> |
3603 | [346; 349) 'get': fn get<S<u64>>(T) -> <T as Trait>::Type | 3603 | [346; 349) 'get': fn get<S<u64>>(T) -> <T as Trait>::Type |
3604 | [346; 357) 'get(set(S))': u64 | 3604 | [346; 357) 'get(set(S))': u64 |
3605 | [350; 353) 'set': fn set<S<u64>>(T) -> T | 3605 | [350; 353) 'set': fn set<S<u64>>(T) -> T |