aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-05-29 18:14:04 +0100
committerFlorian Diebold <[email protected]>2020-06-05 19:09:13 +0100
commita4a4a1854ebb53e1cdd7a5e3b308112bbbf3c676 (patch)
tree343d39c2a01bd3643bcab13eb01dfbd4f6a511cc /crates/ra_assists/src/handlers
parent02f7b5d7abbab829c2a0f66cdcbb6678afb412a4 (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_assists/src/handlers')
-rw-r--r--crates/ra_assists/src/handlers/add_explicit_type.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/add_explicit_type.rs b/crates/ra_assists/src/handlers/add_explicit_type.rs
index ab20c6649..90b06a625 100644
--- a/crates/ra_assists/src/handlers/add_explicit_type.rs
+++ b/crates/ra_assists/src/handlers/add_explicit_type.rs
@@ -195,7 +195,7 @@ struct Test<K, T = u8> {
195} 195}
196 196
197fn main() { 197fn main() {
198 let test<|> = Test { t: 23, k: 33 }; 198 let test<|> = Test { t: 23u8, k: 33 };
199}"#, 199}"#,
200 r#" 200 r#"
201struct Test<K, T = u8> { 201struct Test<K, T = u8> {
@@ -204,7 +204,7 @@ struct Test<K, T = u8> {
204} 204}
205 205
206fn main() { 206fn main() {
207 let test: Test<i32> = Test { t: 23, k: 33 }; 207 let test: Test<i32> = Test { t: 23u8, k: 33 };
208}"#, 208}"#,
209 ); 209 );
210 } 210 }