aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/doc_tests/generated.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/doc_tests/generated.rs')
-rw-r--r--crates/ra_assists/src/doc_tests/generated.rs24
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 c0486a8a9..0848ab6bc 100644
--- a/crates/ra_assists/src/doc_tests/generated.rs
+++ b/crates/ra_assists/src/doc_tests/generated.rs
@@ -649,6 +649,30 @@ fn process(map: HashMap<String, String>) {}
649} 649}
650 650
651#[test] 651#[test]
652fn doctest_replace_unwrap_with_match() {
653 check(
654 "replace_unwrap_with_match",
655 r#####"
656enum Result<T, E> { Ok(T), Err(E) }
657fn main() {
658 let x: Result<i32, i32> = Result::Ok(92);
659 let y = x.<|>unwrap();
660}
661"#####,
662 r#####"
663enum Result<T, E> { Ok(T), Err(E) }
664fn main() {
665 let x: Result<i32, i32> = Result::Ok(92);
666 let y = match x {
667 Ok(a) => a,
668 _ => unreachable!(),
669 };
670}
671"#####,
672 )
673}
674
675#[test]
652fn doctest_split_import() { 676fn doctest_split_import() {
653 check( 677 check(
654 "split_import", 678 "split_import",