diff options
author | Aleksey Kladov <[email protected]> | 2019-10-26 17:58:18 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-26 18:57:23 +0100 |
commit | 4a83aae09849123dbbbc5726b07c2601a14397a8 (patch) | |
tree | b8944447b98e8b0b25ac95d0465210312bf4cd57 /crates/ra_assists/src/doc_tests | |
parent | 733fd64260793a0f7335e4f75ba9197d5fa98b70 (diff) |
support range selection in assist docs
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 | } | ||