diff options
author | Florian Diebold <[email protected]> | 2020-05-29 18:14:04 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-06-05 19:09:13 +0100 |
commit | a4a4a1854ebb53e1cdd7a5e3b308112bbbf3c676 (patch) | |
tree | 343d39c2a01bd3643bcab13eb01dfbd4f6a511cc /crates/ra_hir_ty/src/tests/display_source_code.rs | |
parent | 02f7b5d7abbab829c2a0f66cdcbb6678afb412a4 (diff) |
Fix type parameter defaults
They should not be applied in expression or pattern contexts, unless there are
other explicitly given type args.
Diffstat (limited to 'crates/ra_hir_ty/src/tests/display_source_code.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests/display_source_code.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/tests/display_source_code.rs b/crates/ra_hir_ty/src/tests/display_source_code.rs index 4088b1d22..5dfa0a014 100644 --- a/crates/ra_hir_ty/src/tests/display_source_code.rs +++ b/crates/ra_hir_ty/src/tests/display_source_code.rs | |||
@@ -29,7 +29,7 @@ fn omit_default_type_parameters() { | |||
29 | //- /main.rs | 29 | //- /main.rs |
30 | struct Foo<T = u8> { t: T } | 30 | struct Foo<T = u8> { t: T } |
31 | fn main() { | 31 | fn main() { |
32 | let foo = Foo { t: 5 }; | 32 | let foo = Foo { t: 5u8 }; |
33 | foo<|>; | 33 | foo<|>; |
34 | } | 34 | } |
35 | ", | 35 | ", |
@@ -41,7 +41,7 @@ fn omit_default_type_parameters() { | |||
41 | //- /main.rs | 41 | //- /main.rs |
42 | struct Foo<K, T = u8> { k: K, t: T } | 42 | struct Foo<K, T = u8> { k: K, t: T } |
43 | fn main() { | 43 | fn main() { |
44 | let foo = Foo { k: 400, t: 5 }; | 44 | let foo = Foo { k: 400, t: 5u8 }; |
45 | foo<|>; | 45 | foo<|>; |
46 | } | 46 | } |
47 | ", | 47 | ", |