diff options
Diffstat (limited to 'crates/ide_completion/src/completions/postfix.rs')
-rw-r--r-- | crates/ide_completion/src/completions/postfix.rs | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/crates/ide_completion/src/completions/postfix.rs b/crates/ide_completion/src/completions/postfix.rs index c3c7e4589..4e20ec003 100644 --- a/crates/ide_completion/src/completions/postfix.rs +++ b/crates/ide_completion/src/completions/postfix.rs | |||
@@ -436,18 +436,15 @@ fn main() { | |||
436 | check_edit( | 436 | check_edit( |
437 | "ifl", | 437 | "ifl", |
438 | r#" | 438 | r#" |
439 | enum Option<T> { Some(T), None } | 439 | //- minicore: option |
440 | |||
441 | fn main() { | 440 | fn main() { |
442 | let bar = Option::Some(true); | 441 | let bar = Some(true); |
443 | bar.$0 | 442 | bar.$0 |
444 | } | 443 | } |
445 | "#, | 444 | "#, |
446 | r#" | 445 | r#" |
447 | enum Option<T> { Some(T), None } | ||
448 | |||
449 | fn main() { | 446 | fn main() { |
450 | let bar = Option::Some(true); | 447 | let bar = Some(true); |
451 | if let Some($1) = bar { | 448 | if let Some($1) = bar { |
452 | $0 | 449 | $0 |
453 | } | 450 | } |
@@ -461,18 +458,15 @@ fn main() { | |||
461 | check_edit( | 458 | check_edit( |
462 | "match", | 459 | "match", |
463 | r#" | 460 | r#" |
464 | enum Result<T, E> { Ok(T), Err(E) } | 461 | //- minicore: result |
465 | |||
466 | fn main() { | 462 | fn main() { |
467 | let bar = Result::Ok(true); | 463 | let bar = Ok(true); |
468 | bar.$0 | 464 | bar.$0 |
469 | } | 465 | } |
470 | "#, | 466 | "#, |
471 | r#" | 467 | r#" |
472 | enum Result<T, E> { Ok(T), Err(E) } | ||
473 | |||
474 | fn main() { | 468 | fn main() { |
475 | let bar = Result::Ok(true); | 469 | let bar = Ok(true); |
476 | match bar { | 470 | match bar { |
477 | Ok(${1:_}) => {$2}, | 471 | Ok(${1:_}) => {$2}, |
478 | Err(${3:_}) => {$0}, | 472 | Err(${3:_}) => {$0}, |
@@ -515,18 +509,15 @@ fn main() { | |||
515 | check_edit( | 509 | check_edit( |
516 | "ifl", | 510 | "ifl", |
517 | r#" | 511 | r#" |
518 | enum Option<T> { Some(T), None } | 512 | //- minicore: option |
519 | |||
520 | fn main() { | 513 | fn main() { |
521 | let bar = &Option::Some(true); | 514 | let bar = &Some(true); |
522 | bar.$0 | 515 | bar.$0 |
523 | } | 516 | } |
524 | "#, | 517 | "#, |
525 | r#" | 518 | r#" |
526 | enum Option<T> { Some(T), None } | ||
527 | |||
528 | fn main() { | 519 | fn main() { |
529 | let bar = &Option::Some(true); | 520 | let bar = &Some(true); |
530 | if let Some($1) = bar { | 521 | if let Some($1) = bar { |
531 | $0 | 522 | $0 |
532 | } | 523 | } |