aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
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_ide/src
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_ide/src')
-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 },