aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-06 11:56:59 +0100
committerGitHub <[email protected]>2020-06-06 11:56:59 +0100
commita609336d7287b3ddddbde30b1f0fb606bf149baf (patch)
tree343d39c2a01bd3643bcab13eb01dfbd4f6a511cc /crates/ra_assists
parent02f7b5d7abbab829c2a0f66cdcbb6678afb412a4 (diff)
parenta4a4a1854ebb53e1cdd7a5e3b308112bbbf3c676 (diff)
Merge #4765
4765: Fix type parameter defaults r=matklad a=flodiebold They should not be applied in expression or pattern contexts, unless there are other explicitly given type args. (The existing tests about this were actually wrong.) Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_assists')
-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 }