diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:24 +0000 |
commit | 023939b627b7dc93b01471f7d41fb8553ddb4ffa (patch) | |
tree | 60fc59477c605c72b0a1051409062ddecc43f877 /vendor/darling_macro | |
parent | Adding debian version 1.72.1+dfsg1-1. (diff) | |
download | rustc-023939b627b7dc93b01471f7d41fb8553ddb4ffa.tar.xz rustc-023939b627b7dc93b01471f7d41fb8553ddb4ffa.zip |
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/darling_macro')
-rw-r--r-- | vendor/darling_macro/.cargo-checksum.json | 1 | ||||
-rw-r--r-- | vendor/darling_macro/Cargo.toml | 34 | ||||
-rw-r--r-- | vendor/darling_macro/LICENSE | 21 | ||||
-rw-r--r-- | vendor/darling_macro/src/lib.rs | 40 |
4 files changed, 96 insertions, 0 deletions
diff --git a/vendor/darling_macro/.cargo-checksum.json b/vendor/darling_macro/.cargo-checksum.json new file mode 100644 index 000000000..e53be0552 --- /dev/null +++ b/vendor/darling_macro/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{"Cargo.toml":"cbbccaefd86245ae3273eee43051f41da9638cb091b4ec3e2c72425fc439136c","LICENSE":"8ea93490d74a5a1b1af3ff71d786271b3f1e5f0bea79ac16e02ec533cef040d6","src/lib.rs":"728be3bb12c9cdaaf0520bce87e489a0820e436c78fa3627e238fc1acc11dd7f"},"package":"836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5"}
\ No newline at end of file diff --git a/vendor/darling_macro/Cargo.toml b/vendor/darling_macro/Cargo.toml new file mode 100644 index 000000000..6747cf2f7 --- /dev/null +++ b/vendor/darling_macro/Cargo.toml @@ -0,0 +1,34 @@ +# 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 are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. + +[package] +edition = "2018" +name = "darling_macro" +version = "0.20.3" +authors = ["Ted Driggs <ted.driggs@outlook.com>"] +description = """ +Internal support for a proc-macro library for reading attributes into structs when +implementing custom derives. Use https://crates.io/crates/darling in your code. +""" +license = "MIT" +repository = "https://github.com/TedDriggs/darling" + +[lib] +proc-macro = true + +[dependencies.darling_core] +version = "=0.20.3" + +[dependencies.quote] +version = "1.0.18" + +[dependencies.syn] +version = "2.0.15" diff --git a/vendor/darling_macro/LICENSE b/vendor/darling_macro/LICENSE new file mode 100644 index 000000000..0b48eadc9 --- /dev/null +++ b/vendor/darling_macro/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Ted Driggs + +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/darling_macro/src/lib.rs b/vendor/darling_macro/src/lib.rs new file mode 100644 index 000000000..8da0272eb --- /dev/null +++ b/vendor/darling_macro/src/lib.rs @@ -0,0 +1,40 @@ +use darling_core::{derive, Error}; +use proc_macro::TokenStream; +use syn::parse_macro_input; + +#[proc_macro_derive(FromMeta, attributes(darling))] +pub fn derive_from_meta(input: TokenStream) -> TokenStream { + derive::from_meta(&parse_macro_input!(input)).into() +} + +#[proc_macro_derive(FromMetaItem, attributes(darling))] +pub fn derive_from_meta_item(_input: TokenStream) -> TokenStream { + Error::custom("darling::FromMetaItem has been replaced by darling::FromMeta") + .write_errors() + .into() +} + +#[proc_macro_derive(FromAttributes, attributes(darling))] +pub fn derive_from_attributes(input: TokenStream) -> TokenStream { + derive::from_attributes(&parse_macro_input!(input)).into() +} + +#[proc_macro_derive(FromDeriveInput, attributes(darling))] +pub fn derive_from_input(input: TokenStream) -> TokenStream { + derive::from_derive_input(&parse_macro_input!(input)).into() +} + +#[proc_macro_derive(FromField, attributes(darling))] +pub fn derive_field(input: TokenStream) -> TokenStream { + derive::from_field(&parse_macro_input!(input)).into() +} + +#[proc_macro_derive(FromTypeParam, attributes(darling))] +pub fn derive_type_param(input: TokenStream) -> TokenStream { + derive::from_type_param(&parse_macro_input!(input)).into() +} + +#[proc_macro_derive(FromVariant, attributes(darling))] +pub fn derive_variant(input: TokenStream) -> TokenStream { + derive::from_variant(&parse_macro_input!(input)).into() +} |