diff options
Diffstat (limited to '')
-rw-r--r-- | vendor/ahash-0.7.6/LICENSE-APACHE (renamed from vendor/cfg-if-0.1.10/LICENSE-APACHE) | 0 | ||||
-rw-r--r-- | vendor/cfg-if-0.1.10/.cargo-checksum.json | 1 | ||||
-rw-r--r-- | vendor/cfg-if-0.1.10/Cargo.toml | 36 | ||||
-rw-r--r-- | vendor/cfg-if-0.1.10/LICENSE-MIT | 25 | ||||
-rw-r--r-- | vendor/cfg-if-0.1.10/README.md | 47 | ||||
-rw-r--r-- | vendor/cfg-if-0.1.10/src/lib.rs | 176 | ||||
-rw-r--r-- | vendor/cfg-if-0.1.10/tests/xcrate.rs | 14 |
7 files changed, 0 insertions, 299 deletions
diff --git a/vendor/cfg-if-0.1.10/LICENSE-APACHE b/vendor/ahash-0.7.6/LICENSE-APACHE index 16fe87b06..16fe87b06 100644 --- a/vendor/cfg-if-0.1.10/LICENSE-APACHE +++ b/vendor/ahash-0.7.6/LICENSE-APACHE diff --git a/vendor/cfg-if-0.1.10/.cargo-checksum.json b/vendor/cfg-if-0.1.10/.cargo-checksum.json deleted file mode 100644 index c0c9f9d04..000000000 --- a/vendor/cfg-if-0.1.10/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"files":{"Cargo.toml":"2cb2370b62c56a7d51b51f9e405b2f377b3ad6f7f8d33bc69e20eb819ad66012","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"2406e83ee174e30aa67f8ab266836fa78545012b196395aff37c152321e2c713","src/lib.rs":"8dfd667d32d8b06e529643c975dfa14c29ce9a894a80e381a1bd867252e65e56","tests/xcrate.rs":"c0734dae6e63beafcd60bf53546115a2320735b51035c9e2387fdf9301580934"},"package":"4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"}
\ No newline at end of file diff --git a/vendor/cfg-if-0.1.10/Cargo.toml b/vendor/cfg-if-0.1.10/Cargo.toml deleted file mode 100644 index 5da1d1b4b..000000000 --- a/vendor/cfg-if-0.1.10/Cargo.toml +++ /dev/null @@ -1,36 +0,0 @@ -# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -# -# When uploading crates to the registry Cargo will automatically -# "normalize" Cargo.toml files for maximal compatibility -# with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies -# -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) - -[package] -edition = "2018" -name = "cfg-if" -version = "0.1.10" -authors = ["Alex Crichton <alex@alexcrichton.com>"] -description = "A macro to ergonomically define an item depending on a large number of #[cfg]\nparameters. Structured like an if-else chain, the first matching branch is the\nitem that gets emitted.\n" -homepage = "https://github.com/alexcrichton/cfg-if" -documentation = "https://docs.rs/cfg-if" -readme = "README.md" -license = "MIT/Apache-2.0" -repository = "https://github.com/alexcrichton/cfg-if" -[dependencies.compiler_builtins] -version = "0.1.2" -optional = true - -[dependencies.core] -version = "1.0.0" -optional = true -package = "rustc-std-workspace-core" - -[features] -rustc-dep-of-std = ["core", "compiler_builtins"] -[badges.travis-ci] -repository = "alexcrichton/cfg-if" diff --git a/vendor/cfg-if-0.1.10/LICENSE-MIT b/vendor/cfg-if-0.1.10/LICENSE-MIT deleted file mode 100644 index 39e0ed660..000000000 --- a/vendor/cfg-if-0.1.10/LICENSE-MIT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2014 Alex Crichton - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/vendor/cfg-if-0.1.10/README.md b/vendor/cfg-if-0.1.10/README.md deleted file mode 100644 index 50b5e3b2d..000000000 --- a/vendor/cfg-if-0.1.10/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# cfg-if - -[Documentation](https://docs.rs/cfg-if) - -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. - -```toml -[dependencies] -cfg-if = "0.1" -``` - -## Example - -```rust -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(); -} -``` - -# License - -This project is licensed under either of - - * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or - http://www.apache.org/licenses/LICENSE-2.0) - * MIT license ([LICENSE-MIT](LICENSE-MIT) or - http://opensource.org/licenses/MIT) - -at your option. - -### Contribution - -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. diff --git a/vendor/cfg-if-0.1.10/src/lib.rs b/vendor/cfg-if-0.1.10/src/lib.rs deleted file mode 100644 index 6c5058dad..000000000 --- a/vendor/cfg-if-0.1.10/src/lib.rs +++ /dev/null @@ -1,176 +0,0 @@ -//! A macro for defining `#[cfg]` if-else statements. -//! -//! The macro provided by this crate, `cfg_if`, is similar to the `if/elif` C -//! preprocessor macro by allowing definition of a cascade of `#[cfg]` cases, -//! emitting the implementation which matches first. -//! -//! This allows you to conveniently provide a long list `#[cfg]`'d blocks of code -//! without having to rewrite each clause multiple times. -//! -//! # Example -//! -//! ``` -//! 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() {} -//! ``` - -#![no_std] -#![doc(html_root_url = "https://docs.rs/cfg-if")] -#![deny(missing_docs)] -#![cfg_attr(test, deny(warnings))] - -/// The main macro provided by this crate. See crate documentation for more -/// information. -#[macro_export] -macro_rules! cfg_if { - // match if/else chains with a final `else` - ($( - if #[cfg($($meta:meta),*)] { $($tokens:tt)* } - ) else * else { - $($tokens2:tt)* - }) => { - $crate::cfg_if! { - @__items - () ; - $( ( ($($meta),*) ($($tokens)*) ), )* - ( () ($($tokens2)*) ), - } - }; - - // match if/else chains lacking a final `else` - ( - if #[cfg($($i_met:meta),*)] { $($i_tokens:tt)* } - $( - else if #[cfg($($e_met:meta),*)] { $($e_tokens:tt)* } - )* - ) => { - $crate::cfg_if! { - @__items - () ; - ( ($($i_met),*) ($($i_tokens)*) ), - $( ( ($($e_met),*) ($($e_tokens)*) ), )* - ( () () ), - } - }; - - // Internal and recursive macro to emit all the items - // - // Collects all the negated cfgs in a list at the beginning and after the - // semicolon is all the remaining items - (@__items ($($not:meta,)*) ; ) => {}; - (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($tokens:tt)*) ), $($rest:tt)*) => { - // Emit all items within one block, applying an appropriate #[cfg]. The - // #[cfg] will require all `$m` matchers specified and must also negate - // all previous matchers. - #[cfg(all($($m,)* not(any($($not),*))))] $crate::cfg_if! { @__identity $($tokens)* } - - // Recurse to emit all other items in `$rest`, and when we do so add all - // our `$m` matchers to the list of `$not` matchers as future emissions - // will have to negate everything we just matched as well. - $crate::cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* } - }; - - // Internal macro to make __apply work out right for different match types, - // because of how macros matching/expand stuff. - (@__identity $($tokens:tt)*) => { - $($tokens)* - }; -} - -#[cfg(test)] -mod tests { - cfg_if! { - if #[cfg(test)] { - use core::option::Option as Option2; - fn works1() -> Option2<u32> { Some(1) } - } else { - fn works1() -> Option<u32> { None } - } - } - - cfg_if! { - if #[cfg(foo)] { - fn works2() -> bool { false } - } else if #[cfg(test)] { - fn works2() -> bool { true } - } else { - fn works2() -> bool { false } - } - } - - cfg_if! { - if #[cfg(foo)] { - fn works3() -> bool { false } - } else { - fn works3() -> bool { true } - } - } - - cfg_if! { - if #[cfg(test)] { - use core::option::Option as Option3; - fn works4() -> Option3<u32> { Some(1) } - } - } - - cfg_if! { - if #[cfg(foo)] { - fn works5() -> bool { false } - } else if #[cfg(test)] { - fn works5() -> bool { true } - } - } - - #[test] - fn it_works() { - assert!(works1().is_some()); - assert!(works2()); - assert!(works3()); - assert!(works4().is_some()); - assert!(works5()); - } - - #[test] - #[allow(clippy::assertions_on_constants)] - fn test_usage_within_a_function() { - cfg_if! {if #[cfg(debug_assertions)] { - // we want to put more than one thing here to make sure that they - // all get configured properly. - assert!(cfg!(debug_assertions)); - assert_eq!(4, 2+2); - } else { - assert!(works1().is_some()); - assert_eq!(10, 5+5); - }} - } - - trait Trait { - fn blah(&self); - } - - #[allow(dead_code)] - struct Struct; - - impl Trait for Struct { - cfg_if! { - if #[cfg(feature = "blah")] { - fn blah(&self) { - unimplemented!(); - } - } else { - fn blah(&self) { - unimplemented!(); - } - } - } - } -} diff --git a/vendor/cfg-if-0.1.10/tests/xcrate.rs b/vendor/cfg-if-0.1.10/tests/xcrate.rs deleted file mode 100644 index e7b4a362a..000000000 --- a/vendor/cfg-if-0.1.10/tests/xcrate.rs +++ /dev/null @@ -1,14 +0,0 @@ -cfg_if::cfg_if! { - if #[cfg(foo)] { - fn works() -> bool { false } - } else if #[cfg(test)] { - fn works() -> bool { true } - } else { - fn works() -> bool { false } - } -} - -#[test] -fn smoke() { - assert!(works()); -} |