]> git.lizzy.rs Git - rust.git/blobdiff - crates/ide_assists/src/handlers/flip_comma.rs
Merge #11481
[rust.git] / crates / ide_assists / src / handlers / flip_comma.rs
index 7f5e75d34506981ca5ae18f2f7b0871570320d27..99be5e090ce2a53d7eb1492536cf88d5eb7234e8 100644 (file)
@@ -66,26 +66,12 @@ fn flip_comma_target() {
     }
 
     #[test]
-    #[should_panic]
     fn flip_comma_before_punct() {
         // See https://github.com/rust-analyzer/rust-analyzer/issues/1619
         // "Flip comma" assist shouldn't be applicable to the last comma in enum or struct
         // declaration body.
-        check_assist_target(
-            flip_comma,
-            "pub enum Test { \
-             A,$0 \
-             }",
-            ",",
-        );
-
-        check_assist_target(
-            flip_comma,
-            "pub struct Test { \
-             foo: usize,$0 \
-             }",
-            ",",
-        );
+        check_assist_not_applicable(flip_comma, "pub enum Test { A,$0 }");
+        check_assist_not_applicable(flip_comma, "pub struct Test { foo: usize,$0 }");
     }
 
     #[test]