Skip to content

Commit 544322e

Browse files
committed
Generate doctest
1 parent a05a2ab commit 544322e

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

crates/ra_assists/src/handlers/expand_glob_import.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use crate::{
3131
// pub struct Baz;
3232
// }
3333
//
34-
// use foo::{Bar, Baz};
34+
// use foo::{Baz, Bar};
3535
//
3636
// fn qux(bar: Bar, baz: Baz) {}
3737
// ```

crates/ra_assists/src/tests/generated.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,33 @@ fn main() {
228228
)
229229
}
230230

231+
#[test]
232+
fn doctest_expand_glob_import() {
233+
check_doc_test(
234+
"expand_glob_import",
235+
r#####"
236+
mod foo {
237+
pub struct Bar;
238+
pub struct Baz;
239+
}
240+
241+
use foo::*<|>;
242+
243+
fn qux(bar: Bar, baz: Baz) {}
244+
"#####,
245+
r#####"
246+
mod foo {
247+
pub struct Bar;
248+
pub struct Baz;
249+
}
250+
251+
use foo::{Baz, Bar};
252+
253+
fn qux(bar: Bar, baz: Baz) {}
254+
"#####,
255+
)
256+
}
257+
231258
#[test]
232259
fn doctest_extract_struct_from_enum_variant() {
233260
check_doc_test(

0 commit comments

Comments
 (0)