diff options
Diffstat (limited to 'crates/assists/src/tests/generated.rs')
-rw-r--r-- | crates/assists/src/tests/generated.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/assists/src/tests/generated.rs b/crates/assists/src/tests/generated.rs index 85e3c6742..b15352cf3 100644 --- a/crates/assists/src/tests/generated.rs +++ b/crates/assists/src/tests/generated.rs | |||
@@ -531,6 +531,29 @@ fn foo() -> i32 { 42i32 } | |||
531 | } | 531 | } |
532 | 532 | ||
533 | #[test] | 533 | #[test] |
534 | fn doctest_inline_function() { | ||
535 | check_doc_test( | ||
536 | "inline_function", | ||
537 | r#####" | ||
538 | fn add(a: u32, b: u32) -> u32 { a + b } | ||
539 | fn main() { | ||
540 | let x = add<|>(1, 2); | ||
541 | } | ||
542 | "#####, | ||
543 | r#####" | ||
544 | fn add(a: u32, b: u32) -> u32 { a + b } | ||
545 | fn main() { | ||
546 | let x = { | ||
547 | let a = 1; | ||
548 | let b = 2; | ||
549 | a + b | ||
550 | }; | ||
551 | } | ||
552 | "#####, | ||
553 | ) | ||
554 | } | ||
555 | |||
556 | #[test] | ||
534 | fn doctest_inline_local_variable() { | 557 | fn doctest_inline_local_variable() { |
535 | check_doc_test( | 558 | check_doc_test( |
536 | "inline_local_variable", | 559 | "inline_local_variable", |