aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe/src/tests.rs')
-rw-r--r--crates/ra_mbe/src/tests.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs
index cdbd4dd1c..bd5a44240 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/ra_mbe/src/tests.rs
@@ -1244,7 +1244,12 @@ fn test_cfg_if_main() {
1244 $( ( ($($meta),*) ($($it)*) ), )* 1244 $( ( ($($meta),*) ($($it)*) ), )*
1245 ( () ($($it2)*) ), 1245 ( () ($($it2)*) ),
1246 } 1246 }
1247 } 1247 };
1248
1249 // Internal macro to Apply a cfg attribute to a list of items
1250 (@__apply $m:meta, $($it:item)*) => {
1251 $(#[$m] $it)*
1252 };
1248 } 1253 }
1249"#, 1254"#,
1250 ); 1255 );
@@ -1262,6 +1267,12 @@ cfg_if ! {
1262 } 1267 }
1263"#, 1268"#,
1264 "__cfg_if_items ! {() ; ((target_env = \"msvc\") ()) , ((all (target_arch = \"wasm32\" , not (target_os = \"emscripten\"))) ()) , (() (mod libunwind ; pub use libunwind :: * ;)) ,}"); 1269 "__cfg_if_items ! {() ; ((target_env = \"msvc\") ()) , ((all (target_arch = \"wasm32\" , not (target_os = \"emscripten\"))) ()) , (() (mod libunwind ; pub use libunwind :: * ;)) ,}");
1270
1271 assert_expansion(MacroKind::Items, &rules, r#"
1272cfg_if ! { @ __apply cfg ( all ( not ( any ( not ( any ( target_os = "solaris" , target_os = "illumos" ) ) ) ) ) ) , }
1273"#,
1274 ""
1275 );
1265} 1276}
1266 1277
1267#[test] 1278#[test]