diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ide/src/inlay_hints.rs | 17 | ||||
-rw-r--r-- | crates/ide_assists/src/handlers/fill_match_arms.rs | 11 | ||||
-rw-r--r-- | crates/ide_completion/src/completions/postfix.rs | 9 |
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#" |
664 | enum Option<T> { None, Some(T) } | 664 | //- minicore: option |
665 | use Option::*; | ||
666 | |||
667 | struct FileId {} | 665 | struct FileId {} |
668 | struct SmolStr {} | 666 | struct 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 | |||
876 | fn foo() -> impl Fn() { loop {} } | 873 | fn foo() -> impl Fn() { loop {} } |
877 | fn foo1() -> impl Fn(f64) { loop {} } | 874 | fn foo1() -> impl Fn(f64) { loop {} } |
878 | fn foo2() -> impl Fn(f64, f64) { loop {} } | 875 | fn 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#" |
963 | enum Option<T> { None, Some(T) } | 960 | //- minicore: option |
964 | use Option::*; | ||
965 | |||
966 | struct Test { a: Option<u32>, b: u8 } | 961 | struct Test { a: Option<u32>, b: u8 } |
967 | 962 | ||
968 | fn main() { | 963 | fn 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#" |
995 | enum Option<T> { None, Some(T) } | 990 | //- minicore: option |
996 | use Option::*; | ||
997 | |||
998 | struct Test { a: Option<u32>, b: u8 } | 991 | struct Test { a: Option<u32>, b: u8 } |
999 | 992 | ||
1000 | fn main() { | 993 | fn 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#" |
1013 | enum Option<T> { None, Some(T) } | 1006 | //- minicore: option |
1014 | use Option::*; | ||
1015 | |||
1016 | struct Test { a: Option<u32>, b: u8 } | 1007 | struct Test { a: Option<u32>, b: u8 } |
1017 | 1008 | ||
1018 | fn main() { | 1009 | fn 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#" |
484 | enum Option<T> { Some(T), None } | 484 | //- minicore: option |
485 | use Option::*; | ||
486 | |||
487 | fn main() { | 485 | fn main() { |
488 | match None$0 { | 486 | match None$0 { |
489 | None => {} | 487 | None => {} |
490 | } | 488 | } |
491 | } | 489 | } |
492 | "#, | 490 | "#, |
493 | r#" | 491 | r#" |
494 | enum Option<T> { Some(T), None } | ||
495 | use Option::*; | ||
496 | |||
497 | fn main() { | 492 | fn 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#" |
512 | enum Option<T> { Some(T), None } | 512 | //- minicore: option |
513 | |||
514 | fn main() { | 513 | fn 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#" |
520 | enum Option<T> { Some(T), None } | ||
521 | |||
522 | fn main() { | 519 | fn 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 | } |