| 1 | //! Derive macro for daft (internal crate). |
| 2 | //! |
| 3 | //! For more information about daft, see [its documentation](https://docs.rs/daft). |
| 4 | // Setting html_root_url allows daft's readme to have links to daft-derive. This |
| 5 | // line is updated by cargo-release. |
| 6 | #![doc(html_root_url = "https://docs.rs/daft-derive/0.1.5")] |
| 7 | mod internalsrust-analyzer cargo daft-derive 0.1.5 internals/; |
| 8 | |
| 9 | use quoterust-analyzer cargo quote 1.0.38 crate/::ToTokensrust-analyzer cargo quote 1.0.38 to_tokens/ToTokens#; |
| 10 | use synrust-analyzer cargo syn 2.0.96 crate/::parse_macro_inputrust-analyzer cargo syn 2.0.96 parse_macro_input/; |
| 11 | |
| 12 | // NOTE: We do not define documentation here -- only in daft while re-exporting |
| 13 | // these items. This is so that doctests that depend on daft work. |
| 14 | |
| 15 | #[proc_macro_derive(Diffable, attributes(daft))] |
| 16 | pub fn derive_diffablerust-analyzer cargo daft-derive 0.1.5 Diffable:( |
| 17 | input: proc_macrorust-analyzer cargo proc_macro https://github.com/rust-lang/rust/library/proc_macro crate/::TokenStreamrust-analyzer cargo proc_macro https://github.com/rust-lang/rust/library/proc_macro TokenStream#, |
| 18 | ) -> proc_macrorust-analyzer cargo proc_macro https://github.com/rust-lang/rust/library/proc_macro crate/::TokenStreamrust-analyzer cargo proc_macro https://github.com/rust-lang/rust/library/proc_macro TokenStream# { |
| 19 | let input = parse_macro_inputrust-analyzer cargo syn 2.0.96 parse_macro_input/parse_macro_input!!(input as synrust-analyzer cargo syn 2.0.96 crate/::DeriveInputrust-analyzer cargo syn 2.0.96 derive/DeriveInput#); |
| 20 | internalsrust-analyzer cargo daft-derive 0.1.5 internals/::derive_diffablerust-analyzer cargo daft-derive 0.1.5 internals/imp/derive_diffable().(input).into_token_streamrust-analyzer cargo quote 1.0.38 to_tokens/ToTokens#into_token_stream().().intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 21 | } |