diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-31 13:26:57 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-31 13:26:57 +0100 |
commit | 75011bbccbf2e00092222a1071ba9111f834a4ae (patch) | |
tree | 4e39b7bd20df44f57ab57c27ce1a3a71362b077f /crates/ide_assists/src/tests | |
parent | aca9004c7e4bafe1fc60d0e0298f5687b2e7615a (diff) | |
parent | 3c6c1c99b41e2a3c9a31b0d4c73d660399255cba (diff) |
Merge #8210
8210: Implement "Extract type alias" assist r=jonas-schievink a=jonas-schievink
Co-authored-by: Jonas Schievink <[email protected]>
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ide_assists/src/tests')
-rw-r--r-- | crates/ide_assists/src/tests/generated.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ide_assists/src/tests/generated.rs b/crates/ide_assists/src/tests/generated.rs index 736027ff0..03b7fb366 100644 --- a/crates/ide_assists/src/tests/generated.rs +++ b/crates/ide_assists/src/tests/generated.rs | |||
@@ -329,6 +329,25 @@ enum A { One(One) } | |||
329 | } | 329 | } |
330 | 330 | ||
331 | #[test] | 331 | #[test] |
332 | fn doctest_extract_type_alias() { | ||
333 | check_doc_test( | ||
334 | "extract_type_alias", | ||
335 | r#####" | ||
336 | struct S { | ||
337 | field: $0(u8, u8, u8)$0, | ||
338 | } | ||
339 | "#####, | ||
340 | r#####" | ||
341 | type $0Type = (u8, u8, u8); | ||
342 | |||
343 | struct S { | ||
344 | field: Type, | ||
345 | } | ||
346 | "#####, | ||
347 | ) | ||
348 | } | ||
349 | |||
350 | #[test] | ||
332 | fn doctest_extract_variable() { | 351 | fn doctest_extract_variable() { |
333 | check_doc_test( | 352 | check_doc_test( |
334 | "extract_variable", | 353 | "extract_variable", |