diff options
Diffstat (limited to 'crates/ra_assists/src/doc_tests')
-rw-r--r-- | crates/ra_assists/src/doc_tests/generated.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs index d390db33c..493bd94d0 100644 --- a/crates/ra_assists/src/doc_tests/generated.rs +++ b/crates/ra_assists/src/doc_tests/generated.rs | |||
@@ -255,3 +255,21 @@ fn main() { | |||
255 | "#####, | 255 | "#####, |
256 | ) | 256 | ) |
257 | } | 257 | } |
258 | |||
259 | #[test] | ||
260 | fn doctest_introduce_variable() { | ||
261 | check( | ||
262 | "introduce_variable", | ||
263 | r#####" | ||
264 | fn main() { | ||
265 | <|>(1 + 2)<|> * 4; | ||
266 | } | ||
267 | "#####, | ||
268 | r#####" | ||
269 | fn main() { | ||
270 | let var_name = (1 + 2); | ||
271 | var_name * 4; | ||
272 | } | ||
273 | "#####, | ||
274 | ) | ||
275 | } | ||