syntax: implement cfg!() which evaluates to true/false where #[cfg] would keep/remove.

Example:

   if cfg!(test) {
      calculation_to_run_only_when_testing();
   }
This commit is contained in:
Huon Wilson
2013-08-01 23:03:03 +10:00
parent 5c6069c7a9
commit e995d9935b
4 changed files with 83 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ pub mod ext {
}
pub mod cfg;
pub mod fmt;
pub mod env;
pub mod bytes;