mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
fix: flyimport triggers on enum variant declarations
This commit is contained in:
parent
766b52b598
commit
5666046ec9
4 changed files with 38 additions and 0 deletions
|
@ -1012,3 +1012,34 @@ use self as Str$0;
|
|||
expect![[r#""#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn flyimport_enum_variant() {
|
||||
check(
|
||||
r#"
|
||||
mod foo {
|
||||
pub struct Barbara;
|
||||
}
|
||||
|
||||
enum Foo {
|
||||
Barba$0()
|
||||
}
|
||||
}"#,
|
||||
expect![[r#""#]],
|
||||
);
|
||||
|
||||
check(
|
||||
r#"
|
||||
mod foo {
|
||||
pub struct Barbara;
|
||||
}
|
||||
|
||||
enum Foo {
|
||||
Barba(Barba$0)
|
||||
}
|
||||
}"#,
|
||||
expect![[r#"
|
||||
st Barbara (use foo::Barbara)
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue