aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/inlay_hints.rs17
-rw-r--r--crates/ide_assists/src/handlers/fill_match_arms.rs11
-rw-r--r--crates/ide_completion/src/completions/postfix.rs9
3 files changed, 10 insertions, 27 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs
index 48bab0b2e..95f9edce4 100644
--- a/crates/ide/src/inlay_hints.rs
+++ b/crates/ide/src/inlay_hints.rs
@@ -661,9 +661,7 @@ fn main() {
661 fn function_call_parameter_hint() { 661 fn function_call_parameter_hint() {
662 check_params( 662 check_params(
663 r#" 663 r#"
664enum Option<T> { None, Some(T) } 664//- minicore: option
665use Option::*;
666
667struct FileId {} 665struct FileId {}
668struct SmolStr {} 666struct SmolStr {}
669 667
@@ -872,7 +870,6 @@ fn main() {
872 check_types( 870 check_types(
873 r#" 871 r#"
874//- minicore: fn, sized 872//- minicore: fn, sized
875
876fn foo() -> impl Fn() { loop {} } 873fn foo() -> impl Fn() { loop {} }
877fn foo1() -> impl Fn(f64) { loop {} } 874fn foo1() -> impl Fn(f64) { loop {} }
878fn foo2() -> impl Fn(f64, f64) { loop {} } 875fn foo2() -> impl Fn(f64, f64) { loop {} }
@@ -960,9 +957,7 @@ fn main() {
960 fn if_expr() { 957 fn if_expr() {
961 check_types( 958 check_types(
962 r#" 959 r#"
963enum Option<T> { None, Some(T) } 960//- minicore: option
964use Option::*;
965
966struct Test { a: Option<u32>, b: u8 } 961struct Test { a: Option<u32>, b: u8 }
967 962
968fn main() { 963fn main() {
@@ -992,9 +987,7 @@ fn main() {
992 fn while_expr() { 987 fn while_expr() {
993 check_types( 988 check_types(
994 r#" 989 r#"
995enum Option<T> { None, Some(T) } 990//- minicore: option
996use Option::*;
997
998struct Test { a: Option<u32>, b: u8 } 991struct Test { a: Option<u32>, b: u8 }
999 992
1000fn main() { 993fn main() {
@@ -1010,9 +1003,7 @@ fn main() {
1010 fn match_arm_list() { 1003 fn match_arm_list() {
1011 check_types( 1004 check_types(
1012 r#" 1005 r#"
1013enum Option<T> { None, Some(T) } 1006//- minicore: option
1014use Option::*;
1015
1016struct Test { a: Option<u32>, b: u8 } 1007struct Test { a: Option<u32>, b: u8 }
1017 1008
1018fn main() { 1009fn main() {
diff --git a/crates/ide_assists/src/handlers/fill_match_arms.rs b/crates/ide_assists/src/handlers/fill_match_arms.rs
index cd0f6dba9..318faa0fc 100644
--- a/crates/ide_assists/src/handlers/fill_match_arms.rs
+++ b/crates/ide_assists/src/handlers/fill_match_arms.rs
@@ -481,26 +481,21 @@ fn main() {
481 check_assist( 481 check_assist(
482 fill_match_arms, 482 fill_match_arms,
483 r#" 483 r#"
484enum Option<T> { Some(T), None } 484//- minicore: option
485use Option::*;
486
487fn main() { 485fn main() {
488 match None$0 { 486 match None$0 {
489 None => {} 487 None => {}
490 } 488 }
491} 489}
492 "#, 490"#,
493 r#" 491 r#"
494enum Option<T> { Some(T), None }
495use Option::*;
496
497fn main() { 492fn main() {
498 match None { 493 match None {
499 None => {} 494 None => {}
500 Some(${0:_}) => todo!(), 495 Some(${0:_}) => todo!(),
501 } 496 }
502} 497}
503 "#, 498"#,
504 ); 499 );
505 } 500 }
506 501
diff --git a/crates/ide_completion/src/completions/postfix.rs b/crates/ide_completion/src/completions/postfix.rs
index c11deebcb..4e20ec003 100644
--- a/crates/ide_completion/src/completions/postfix.rs
+++ b/crates/ide_completion/src/completions/postfix.rs
@@ -509,18 +509,15 @@ fn main() {
509 check_edit( 509 check_edit(
510 "ifl", 510 "ifl",
511 r#" 511 r#"
512enum Option<T> { Some(T), None } 512//- minicore: option
513
514fn main() { 513fn main() {
515 let bar = &Option::Some(true); 514 let bar = &Some(true);
516 bar.$0 515 bar.$0
517} 516}
518"#, 517"#,
519 r#" 518 r#"
520enum Option<T> { Some(T), None }
521
522fn main() { 519fn main() {
523 let bar = &Option::Some(true); 520 let bar = &Some(true);
524 if let Some($1) = bar { 521 if let Some($1) = bar {
525 $0 522 $0
526} 523}