diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-05 19:27:44 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-05 19:27:44 +0100 |
commit | bf2d91b26ae5e047abb4f0e7975bb6d0163bab21 (patch) | |
tree | a39fbb5d654a5626ce66c11446776c739b462d6b /crates/ra_hir_ty/src/tests/traits.rs | |
parent | 3431312418ea255e98d3f94536344d396b9b07d6 (diff) | |
parent | 7d62280a713de08b361a08df077ff361b2e1fa99 (diff) |
Merge #3858
3858: Hide unit function return types r=flodiebold a=lnicola
r? @flodiebold
This might be a bit heavy-handed (e.g. `|| -> ()` to `||`), what do you think?
Co-authored-by: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src/tests/traits.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests/traits.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir_ty/src/tests/traits.rs b/crates/ra_hir_ty/src/tests/traits.rs index f009a708c..081aa943a 100644 --- a/crates/ra_hir_ty/src/tests/traits.rs +++ b/crates/ra_hir_ty/src/tests/traits.rs | |||
@@ -263,7 +263,7 @@ fn test() { | |||
263 | [119; 120) 'S': S<u32>(u32) -> S<u32> | 263 | [119; 120) 'S': S<u32>(u32) -> S<u32> |
264 | [119; 129) 'S(unknown)': S<u32> | 264 | [119; 129) 'S(unknown)': S<u32> |
265 | [121; 128) 'unknown': u32 | 265 | [121; 128) 'unknown': u32 |
266 | [135; 138) 'foo': fn foo<S<u32>>(S<u32>) -> () | 266 | [135; 138) 'foo': fn foo<S<u32>>(S<u32>) |
267 | [135; 141) 'foo(s)': () | 267 | [135; 141) 'foo(s)': () |
268 | [139; 140) 's': S<u32> | 268 | [139; 140) 's': S<u32> |
269 | "### | 269 | "### |
@@ -962,7 +962,7 @@ fn test(x: impl Trait<u64>, y: &impl Trait<u32>) { | |||
962 | [224; 225) 'S': S<u16>(u16) -> S<u16> | 962 | [224; 225) 'S': S<u16>(u16) -> S<u16> |
963 | [224; 228) 'S(1)': S<u16> | 963 | [224; 228) 'S(1)': S<u16> |
964 | [226; 227) '1': u16 | 964 | [226; 227) '1': u16 |
965 | [234; 237) 'bar': fn bar(S<u16>) -> () | 965 | [234; 237) 'bar': fn bar(S<u16>) |
966 | [234; 240) 'bar(z)': () | 966 | [234; 240) 'bar(z)': () |
967 | [238; 239) 'z': S<u16> | 967 | [238; 239) 'z': S<u16> |
968 | [246; 247) 'x': impl Trait<u64> | 968 | [246; 247) 'x': impl Trait<u64> |
@@ -1108,8 +1108,8 @@ fn test() { | |||
1108 | [40; 47) 'loop {}': ! | 1108 | [40; 47) 'loop {}': ! |
1109 | [45; 47) '{}': () | 1109 | [45; 47) '{}': () |
1110 | [91; 124) '{ ...foo; }': () | 1110 | [91; 124) '{ ...foo; }': () |
1111 | [101; 102) 'f': fn(S) -> () | 1111 | [101; 102) 'f': fn(S) |
1112 | [118; 121) 'foo': fn foo(S) -> () | 1112 | [118; 121) 'foo': fn foo(S) |
1113 | "### | 1113 | "### |
1114 | ); | 1114 | ); |
1115 | } | 1115 | } |
@@ -1962,7 +1962,7 @@ fn test() -> impl Trait<i32> { | |||
1962 | [229; 241) 'S(default())': S<u32> | 1962 | [229; 241) 'S(default())': S<u32> |
1963 | [231; 238) 'default': fn default<u32>() -> u32 | 1963 | [231; 238) 'default': fn default<u32>() -> u32 |
1964 | [231; 240) 'default()': u32 | 1964 | [231; 240) 'default()': u32 |
1965 | [247; 250) 'foo': fn foo(S<u32>) -> () | 1965 | [247; 250) 'foo': fn foo(S<u32>) |
1966 | [247; 254) 'foo(s1)': () | 1966 | [247; 254) 'foo(s1)': () |
1967 | [251; 253) 's1': S<u32> | 1967 | [251; 253) 's1': S<u32> |
1968 | [264; 265) 'x': i32 | 1968 | [264; 265) 'x': i32 |
@@ -2012,7 +2012,7 @@ fn main() { | |||
2012 | [147; 149) '_v': F | 2012 | [147; 149) '_v': F |
2013 | [192; 195) '{ }': () | 2013 | [192; 195) '{ }': () |
2014 | [207; 238) '{ ... }); }': () | 2014 | [207; 238) '{ ... }); }': () |
2015 | [213; 223) 'f::<(), _>': fn f<(), |&()| -> ()>(|&()| -> ()) -> () | 2015 | [213; 223) 'f::<(), _>': fn f<(), |&()| -> ()>(|&()| -> ()) |
2016 | [213; 235) 'f::<()... z; })': () | 2016 | [213; 235) 'f::<()... z; })': () |
2017 | [224; 234) '|z| { z; }': |&()| -> () | 2017 | [224; 234) '|z| { z; }': |&()| -> () |
2018 | [225; 226) 'z': &() | 2018 | [225; 226) 'z': &() |