We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0468d84 + c06c4f9 commit 5b69a34Copy full SHA for 5b69a34
crates/ide-assists/src/handlers/generate_enum_variant.rs
@@ -140,6 +140,33 @@ fn main() {
140
)
141
}
142
143
+ #[test]
144
+ fn generate_basic_enum_variant_in_different_file() {
145
+ check_assist(
146
+ generate_enum_variant,
147
+ r"
148
+//- /main.rs
149
+mod foo;
150
+use foo::Foo;
151
+
152
+fn main() {
153
+ Foo::Baz$0
154
+}
155
156
+//- /foo.rs
157
+enum Foo {
158
+ Bar,
159
160
+",
161
162
163
164
+ Baz,
165
166
167
+ )
168
+ }
169
170
#[test]
171
fn not_applicable_for_existing_variant() {
172
check_assist_not_applicable(
0 commit comments