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