diff options
Diffstat (limited to 'crates/ide_completion/src')
-rw-r--r-- | crates/ide_completion/src/completions/postfix.rs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/crates/ide_completion/src/completions/postfix.rs b/crates/ide_completion/src/completions/postfix.rs index c3c7e4589..c11deebcb 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}, |