aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
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_ide
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_ide')
-rw-r--r--crates/ra_ide/src/hover.rs2
-rw-r--r--crates/ra_ide/src/inlay_hints.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index 62df07459..846d8c69b 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -529,7 +529,7 @@ struct Test<K, T = u8> {
529} 529}
530 530
531fn main() { 531fn main() {
532 let zz<|> = Test { t: 23, k: 33 }; 532 let zz<|> = Test { t: 23u8, k: 33 };
533}"#, 533}"#,
534 &["Test<i32, u8>"], 534 &["Test<i32, u8>"],
535 ); 535 );
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs
index 49366de98..7eb2cef73 100644
--- a/crates/ra_ide/src/inlay_hints.rs
+++ b/crates/ra_ide/src/inlay_hints.rs
@@ -415,7 +415,7 @@ struct Test<K, T = u8> {
415} 415}
416 416
417fn main() { 417fn main() {
418 let zz = Test { t: 23, k: 33 }; 418 let zz = Test { t: 23u8, k: 33 };
419 let zz_ref = &zz; 419 let zz_ref = &zz;
420}"#, 420}"#,
421 ); 421 );
@@ -428,7 +428,7 @@ fn main() {
428 label: "Test<i32>", 428 label: "Test<i32>",
429 }, 429 },
430 InlayHint { 430 InlayHint {
431 range: 105..111, 431 range: 107..113,
432 kind: TypeHint, 432 kind: TypeHint,
433 label: "&Test<i32>", 433 label: "&Test<i32>",
434 }, 434 },