aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/tests.rs
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2019-05-03 18:14:25 +0100
committerEdwin Cheng <[email protected]>2019-05-03 18:14:25 +0100
commit4ba4747578ba22033f6dc8ac9f429b678e37e578 (patch)
tree4e5c79b8302e416d02d95a11f71e13656a26b4fe /crates/ra_mbe/src/tests.rs
parent26b499811489f72ad5176d68d40c9a0748620417 (diff)
Mark unused mbe variable as `Binding::Empty`
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]