Skip to content

Commit d40c0fe

Browse files
committed
test: add test for extract_module
1 parent 513c6d3 commit d40c0fe

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

crates/ide-assists/src/handlers/extract_module.rs

+21
Original file line numberDiff line numberDiff line change
@@ -1708,6 +1708,27 @@ fn main() {
17081708
}
17091709
"#,
17101710
r#"
1711+
mod modname {
1712+
use Direction::{Horizontal, Vertical};
1713+
1714+
pub(crate) struct Point;
1715+
1716+
impl Point {
1717+
pub const fn direction(self, other: Self) -> Option<Direction> {
1718+
Some(Vertical)
1719+
}
1720+
}
1721+
1722+
pub enum Direction {
1723+
Horizontal,
1724+
Vertical,
1725+
}
1726+
}
1727+
use modname::Direction::{Horizontal, Vertical};
1728+
1729+
fn main() {
1730+
let x = Vertical;
1731+
}
17111732
"#,
17121733
);
17131734
}

0 commit comments

Comments
 (0)