diff options
author | Benjamin Coenen <[email protected]> | 2020-05-02 19:27:02 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-05-02 19:27:02 +0100 |
commit | 4613497a7714c6cd87166e6525d764d75f8acefd (patch) | |
tree | 2527ae2c0ef2ef100efee3fcb8899f8e34d0d573 /crates/ra_assists/src/doc_tests | |
parent | 19e28888aa41b2845b47adb7314aed99d3c48679 (diff) | |
parent | 89e1f97515c36ab97bd378d972cabec0feb6d77e (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer into fix_4202
Diffstat (limited to 'crates/ra_assists/src/doc_tests')
-rw-r--r-- | crates/ra_assists/src/doc_tests/generated.rs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs index e4fa9ee36..6696cc832 100644 --- a/crates/ra_assists/src/doc_tests/generated.rs +++ b/crates/ra_assists/src/doc_tests/generated.rs | |||
@@ -180,7 +180,9 @@ trait Trait<T> { | |||
180 | } | 180 | } |
181 | 181 | ||
182 | impl Trait<u32> for () { | 182 | impl Trait<u32> for () { |
183 | fn foo(&self) -> u32 { todo!() } | 183 | fn foo(&self) -> u32 { |
184 | todo!() | ||
185 | } | ||
184 | 186 | ||
185 | } | 187 | } |
186 | "#####, | 188 | "#####, |
@@ -726,3 +728,22 @@ use std::{collections::HashMap}; | |||
726 | "#####, | 728 | "#####, |
727 | ) | 729 | ) |
728 | } | 730 | } |
731 | |||
732 | #[test] | ||
733 | fn doctest_unwrap_block() { | ||
734 | check( | ||
735 | "unwrap_block", | ||
736 | r#####" | ||
737 | fn foo() { | ||
738 | if true {<|> | ||
739 | println!("foo"); | ||
740 | } | ||
741 | } | ||
742 | "#####, | ||
743 | r#####" | ||
744 | fn foo() { | ||
745 | println!("foo"); | ||
746 | } | ||
747 | "#####, | ||
748 | ) | ||
749 | } | ||