From c4fcfa2b0d516b9790fa8abdf96bb2308657d60a Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 25 Aug 2019 13:57:03 +0200 Subject: Properly format `impl Trait` 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. --- crates/ra_hir/src/ty/tests.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 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>(x: T, y: impl Trait) { [166; 169) '{t}': T [167; 168) 't': T [257; 258) 'x': T - [263; 264) 'y': impl Trait + + [263; 264) 'y': impl Trait [290; 398) '{ ...r>); }': () [296; 299) 'get': fn get(T) -> ::Type [296; 302) 'get(x)': {unknown} @@ -3594,12 +3594,12 @@ fn test>(x: T, y: impl Trait) { [308; 312) 'get2': fn get2<{unknown}, S<{unknown}>>(T) -> U [308; 315) 'get2(x)': {unknown} [313; 314) 'x': T - [321; 324) 'get': fn get(T) -> ::Type + [321; 324) 'get': fn get>(T) -> ::Type [321; 327) 'get(y)': {unknown} - [325; 326) 'y': impl Trait + + [325; 326) 'y': impl Trait [333; 337) 'get2': fn get2<{unknown}, S<{unknown}>>(T) -> U [333; 340) 'get2(y)': {unknown} - [338; 339) 'y': impl Trait + + [338; 339) 'y': impl Trait [346; 349) 'get': fn get>(T) -> ::Type [346; 357) 'get(set(S))': u64 [350; 353) 'set': fn set>(T) -> T -- cgit v1.2.3