aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/tests
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-05 18:05:07 +0100
committerGitHub <[email protected]>2020-08-05 18:05:07 +0100
commit5ebf92cd0ed4be97fe0ca5bffefbe292db1ec4cf (patch)
tree6afaf5db6cd8791633090b9345b6a248aa3eff45 /crates/ra_assists/src/tests
parent32246b91c217fff5b3b6ea062c9b9a8797a3fdf5 (diff)
parent6cb090345ece4a97c640159240594f3902e37032 (diff)
Merge #5648
5648: Add expand glob import assist r=jonas-schievink a=unexge closes https://github.com/rust-analyzer/rust-analyzer/issues/5557 Co-authored-by: unexge <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/tests')
-rw-r--r--crates/ra_assists/src/tests/generated.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/crates/ra_assists/src/tests/generated.rs b/crates/ra_assists/src/tests/generated.rs
index eff7feded..97978e7a2 100644
--- a/crates/ra_assists/src/tests/generated.rs
+++ b/crates/ra_assists/src/tests/generated.rs
@@ -229,6 +229,33 @@ fn main() {
229} 229}
230 230
231#[test] 231#[test]
232fn doctest_expand_glob_import() {
233 check_doc_test(
234 "expand_glob_import",
235 r#####"
236mod foo {
237 pub struct Bar;
238 pub struct Baz;
239}
240
241use foo::*<|>;
242
243fn qux(bar: Bar, baz: Baz) {}
244"#####,
245 r#####"
246mod foo {
247 pub struct Bar;
248 pub struct Baz;
249}
250
251use foo::{Baz, Bar};
252
253fn qux(bar: Bar, baz: Baz) {}
254"#####,
255 )
256}
257
258#[test]
232fn doctest_extract_struct_from_enum_variant() { 259fn doctest_extract_struct_from_enum_variant() {
233 check_doc_test( 260 check_doc_test(
234 "extract_struct_from_enum_variant", 261 "extract_struct_from_enum_variant",