commit | 06b54e744be37a93faac868d019b4ec12c91a9cf | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Fri Jul 17 19:20:03 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jul 17 19:20:03 2020 +0000 |
tree | b02ef849fef38d63047931e0ea6309552fc2c29f | |
parent | 8053d19f4891188eac2574ccb0a01bbdeeb0138d [diff] | |
parent | 40cc9179375a19062953101994665f53bdca3930 [diff] |
Regenerate TEST_MAPPING with cargo2android.py am: 40cc917937 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cfg-if/+/1365011 Change-Id: I51f49547ac9272c3019f1056a52661e2f16a8bd0
A macro to ergonomically define an item depending on a large number of #[cfg] parameters. Structured like an if-else chain, the first matching branch is the item that gets emitted.
[dependencies] cfg-if = "0.1"
cfg_if::cfg_if! { if #[cfg(unix)] { fn foo() { /* unix specific functionality */ } } else if #[cfg(target_pointer_width = "32")] { fn foo() { /* non-unix, 32-bit functionality */ } } else { fn foo() { /* fallback implementation */ } } } fn main() { foo(); }
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in cfg-if
by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.