mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +00:00
test: add test for extract_module
This commit is contained in:
parent
513c6d35ed
commit
d40c0fe48b
1 changed files with 21 additions and 0 deletions
|
@ -1708,6 +1708,27 @@ fn main() {
|
|||
}
|
||||
"#,
|
||||
r#"
|
||||
mod modname {
|
||||
use Direction::{Horizontal, Vertical};
|
||||
|
||||
pub(crate) struct Point;
|
||||
|
||||
impl Point {
|
||||
pub const fn direction(self, other: Self) -> Option<Direction> {
|
||||
Some(Vertical)
|
||||
}
|
||||
}
|
||||
|
||||
pub enum Direction {
|
||||
Horizontal,
|
||||
Vertical,
|
||||
}
|
||||
}
|
||||
use modname::Direction::{Horizontal, Vertical};
|
||||
|
||||
fn main() {
|
||||
let x = Vertical;
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue