We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd26403 commit 0bf986dCopy full SHA for 0bf986d
crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs
@@ -440,6 +440,45 @@ mod tests {
440
441
use super::*;
442
443
+ #[test]
444
+ fn test_with_marco() {
445
+ check_assist(
446
+ extract_struct_from_enum_variant,
447
+ r#"
448
+macro_rules! foo {
449
+ ($x:expr) => {
450
+ $x
451
+ };
452
+}
453
+
454
+enum TheEnum {
455
+ TheVariant$0 { the_field: u8 },
456
457
458
+fn main() {
459
+ foo![TheEnum::TheVariant { the_field: 42 }];
460
461
+"#,
462
463
464
465
466
467
468
469
+struct TheVariant{ the_field: u8 }
470
471
472
+ TheVariant(TheVariant),
473
474
475
476
477
478
479
+ );
480
+ }
481
482
#[test]
483
fn issue_16197() {
484
check_assist(
0 commit comments