commit | 3f94de5755fa4b626aa0b8496f0f5dac26bc540f | [log] [tgz] |
---|---|---|
author | Bob Badour <bbadour@google.com> | Wed Feb 17 18:48:51 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Feb 17 18:48:51 2021 +0000 |
tree | 96e7eb8c0153edac20867f21fb1fa0e3d127c959 | |
parent | 37c443d8dac3dd15c189423810d1e4c104df2855 [diff] | |
parent | e4bae8aa7cfd7838ceb787f645dcdedea69c5306 [diff] |
[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/cfg-if am: 1b672ae2a0 am: e4bae8aa7c Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cfg-if/+/1588818 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Id94a5e9bc300d90b476c241078fc4f7b841cae99
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.