diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-26 18:58:12 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-26 18:58:12 +0100 |
commit | 106004139375b64817145d8279cd7904a477c637 (patch) | |
tree | b8944447b98e8b0b25ac95d0465210312bf4cd57 /crates/ra_assists/src/doc_tests/generated.rs | |
parent | 733fd64260793a0f7335e4f75ba9197d5fa98b70 (diff) | |
parent | 4a83aae09849123dbbbc5726b07c2601a14397a8 (diff) |
Merge #2078
2078: support range selection in assist docs r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/doc_tests/generated.rs')
-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 | } | ||