diff options
Diffstat (limited to 'crates/ra_assists/src/doc_tests')
-rw-r--r-- | crates/ra_assists/src/doc_tests/generated.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs index 62dcb3808..543224232 100644 --- a/crates/ra_assists/src/doc_tests/generated.rs +++ b/crates/ra_assists/src/doc_tests/generated.rs | |||
@@ -623,6 +623,30 @@ fn process(map: HashMap<String, String>) {} | |||
623 | } | 623 | } |
624 | 624 | ||
625 | #[test] | 625 | #[test] |
626 | fn doctest_replace_unwrap_with_match() { | ||
627 | check( | ||
628 | "replace_unwrap_with_match", | ||
629 | r#####" | ||
630 | enum Result<T, E> { Ok(T), Err(E) } | ||
631 | fn main() { | ||
632 | let x: Result<i32, i32> = Result::Ok(92); | ||
633 | let y = x.<|>unwrap(); | ||
634 | } | ||
635 | "#####, | ||
636 | r#####" | ||
637 | enum Result<T, E> { Ok(T), Err(E) } | ||
638 | fn main() { | ||
639 | let x: Result<i32, i32> = Result::Ok(92); | ||
640 | let y = match x { | ||
641 | Ok(a) => a, | ||
642 | _ => unreachable!(), | ||
643 | }; | ||
644 | } | ||
645 | "#####, | ||
646 | ) | ||
647 | } | ||
648 | |||
649 | #[test] | ||
626 | fn doctest_split_import() { | 650 | fn doctest_split_import() { |
627 | check( | 651 | check( |
628 | "split_import", | 652 | "split_import", |