| 1 | [package] |
| 2 | name = "auto_enums" |
| 3 | version = "0.8.7" #publish:version |
| 4 | edition = "2021" |
| 5 | rust-version = "1.56" # For syn |
| 6 | license = "Apache-2.0 OR MIT" |
| 7 | repository = "https://github.com/taiki-e/auto_enums" |
| 8 | keywords = ["enum" , "macros" , "derive" , "attribute" ] |
| 9 | categories = ["no-std" , "no-std::no-alloc" , "rust-patterns" ] |
| 10 | exclude = ["/.*" , "/tools" , "/DEVELOPMENT.md" ] |
| 11 | description = "" " |
| 12 | A library for to allow multiple return types by automatically generated enum. |
| 13 | " "" |
| 14 | |
| 15 | [package.metadata.docs.rs] |
| 16 | all-features = true |
| 17 | targets = ["x86_64-unknown-linux-gnu" ] |
| 18 | |
| 19 | [lib] |
| 20 | proc-macro = true |
| 21 | |
| 22 | [features] |
| 23 | # Default features. |
| 24 | default = ["std" ] |
| 25 | |
| 26 | # Analyze return type of function and `let` binding. |
| 27 | type_analysis = [] |
| 28 | |
| 29 | # Enable to use `transpose*` methods. |
| 30 | transpose_methods = [] |
| 31 | |
| 32 | # ------------------------------------------------------------------------------ |
| 33 | # [std|core] libraries |
| 34 | |
| 35 | # Enable to use `std` library's traits. |
| 36 | std = [] |
| 37 | # Enable to use `[std|core]::ops`'s `Deref`, `DerefMut`, `Index`, `IndexMut`, and `RangeBounds` traits. |
| 38 | ops = [] |
| 39 | # Enable to use `[std|core]::convert`'s `AsRef` and `AsMut` traits. |
| 40 | convert = [] |
| 41 | # Enable to use `[std|core]::fmt`'s traits other than `Debug`, `Display` and `Write` |
| 42 | fmt = [] |
| 43 | |
| 44 | # ------------------------------------------------------------------------------ |
| 45 | # Using external libraries |
| 46 | |
| 47 | # https://docs.rs/futures/0.3 |
| 48 | futures03 = [] |
| 49 | # https://docs.rs/futures/0.1 |
| 50 | futures01 = [] |
| 51 | # https://docs.rs/rayon/1 |
| 52 | rayon = [] |
| 53 | # https://docs.rs/serde/1 |
| 54 | serde = [] |
| 55 | # https://docs.rs/tokio/1 |
| 56 | tokio1 = [] |
| 57 | # https://docs.rs/tokio/0.3 |
| 58 | tokio03 = [] |
| 59 | # https://docs.rs/tokio/0.2 |
| 60 | tokio02 = [] |
| 61 | # https://docs.rs/tokio/0.1 |
| 62 | tokio01 = [] |
| 63 | # https://docs.rs/http-body/1 |
| 64 | http_body1 = [] |
| 65 | |
| 66 | # ------------------------------------------------------------------------------ |
| 67 | # Unstable features |
| 68 | # These features are outside of the normal semver guarantees and require the |
| 69 | # `unstable` feature as an explicit opt-in to unstable API. |
| 70 | unstable = [] |
| 71 | |
| 72 | # Enable unstable features of [std|core] libraries |
| 73 | |
| 74 | # Enable to use `[std|core]::ops::Coroutine` trait. |
| 75 | coroutine_trait = [] |
| 76 | generator_trait = ["coroutine_trait" ] # alias for coroutine_trait; TODO: remove in the next breaking release |
| 77 | # Enable to use `[std|core]::ops`'s `Fn`, `FnMut`, and `FnOnce` traits. |
| 78 | fn_traits = [] |
| 79 | # Enable to use `[std|core]::iter::TrustedLen` trait. |
| 80 | trusted_len = [] |
| 81 | |
| 82 | # Note: futures, tokio, rayon, serde, and http-body are public dependencies. |
| 83 | [dependencies] |
| 84 | derive_utils = "0.15" |
| 85 | proc-macro2 = "1.0.60" |
| 86 | quote = "1.0.25" |
| 87 | syn = { version = "2.0.1" , default-features = false, features = ["parsing" , "printing" , "clone-impls" , "proc-macro" , "full" , "visit-mut" ] } |
| 88 | |
| 89 | [dev-dependencies] |
| 90 | macrotest = { git = "https://github.com/taiki-e/macrotest.git" , branch = "dev" } # adjust overwrite behavior + no cargo-expand |
| 91 | rustversion = "1" |
| 92 | trybuild = { git = "https://github.com/taiki-e/trybuild.git" , branch = "dev" } # adjust overwrite behavior |
| 93 | |
| 94 | # for `#[enum_derive]` |
| 95 | futures03_crate = { package = "futures-util" , version = "0.3" , default-features = false, features = ["std" , "io" , "sink" ] } |
| 96 | futures01_crate = { package = "futures" , version = "0.1" } |
| 97 | tokio1_crate = { package = "tokio" , version = "1" , default-features = false } |
| 98 | tokio03_crate = { package = "tokio" , version = "0.3" , default-features = false } |
| 99 | tokio02_crate = { package = "tokio" , version = "0.2" , default-features = false } |
| 100 | tokio01_crate = { package = "tokio" , version = "0.1" , default-features = false, features = ["io" ] } |
| 101 | rayon_crate = { package = "rayon" , version = "1" } |
| 102 | serde_crate = { package = "serde" , version = "1" } |
| 103 | http_body1_crate = { package = "http-body" , version = "1" , default-features = false } |
| 104 | |
| 105 | [lints] |
| 106 | workspace = true |
| 107 | |
| 108 | [workspace] |
| 109 | resolver = "2" |
| 110 | members = ["bench" ] |
| 111 | |
| 112 | # This table is shared by projects under github.com/taiki-e. |
| 113 | # It is not intended for manual editing. |
| 114 | [workspace.lints.rust] |
| 115 | deprecated_safe = "warn" |
| 116 | improper_ctypes = "warn" |
| 117 | improper_ctypes_definitions = "warn" |
| 118 | non_ascii_idents = "warn" |
| 119 | rust_2018_idioms = "warn" |
| 120 | single_use_lifetimes = "warn" |
| 121 | unexpected_cfgs = { level = "warn" , check-cfg = [ |
| 122 | ] } |
| 123 | unnameable_types = "warn" |
| 124 | unreachable_pub = "warn" |
| 125 | # unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV |
| 126 | [workspace.lints.clippy] |
| 127 | all = "warn" # Downgrade deny-by-default lints |
| 128 | pedantic = "warn" |
| 129 | as_ptr_cast_mut = "warn" |
| 130 | as_underscore = "warn" |
| 131 | default_union_representation = "warn" |
| 132 | inline_asm_x86_att_syntax = "warn" |
| 133 | trailing_empty_array = "warn" |
| 134 | transmute_undefined_repr = "warn" |
| 135 | undocumented_unsafe_blocks = "warn" |
| 136 | unused_trait_names = "warn" |
| 137 | # Suppress buggy or noisy clippy lints |
| 138 | bool_assert_comparison = { level = "allow" , priority = 1 } |
| 139 | borrow_as_ptr = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286 |
| 140 | cast_lossless = { level = "allow" , priority = 1 } # https://godbolt.org/z/Pv6vbGG6E |
| 141 | declare_interior_mutable_const = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7665 |
| 142 | doc_markdown = { level = "allow" , priority = 1 } |
| 143 | float_cmp = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725 |
| 144 | incompatible_msrv = { level = "allow" , priority = 1 } # buggy: doesn't consider cfg, https://github.com/rust-lang/rust-clippy/issues/12280, https://github.com/rust-lang/rust-clippy/issues/12257#issuecomment-2093667187 |
| 145 | lint_groups_priority = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920 |
| 146 | manual_assert = { level = "allow" , priority = 1 } |
| 147 | manual_range_contains = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/6455#issuecomment-1225966395 |
| 148 | missing_errors_doc = { level = "allow" , priority = 1 } |
| 149 | module_name_repetitions = { level = "allow" , priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+module_name_repetitions |
| 150 | naive_bytecount = { level = "allow" , priority = 1 } |
| 151 | nonminimal_bool = { level = "allow" , priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+nonminimal_bool |
| 152 | range_plus_one = { level = "allow" , priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+range_plus_one |
| 153 | similar_names = { level = "allow" , priority = 1 } |
| 154 | single_match = { level = "allow" , priority = 1 } |
| 155 | single_match_else = { level = "allow" , priority = 1 } |
| 156 | struct_excessive_bools = { level = "allow" , priority = 1 } |
| 157 | struct_field_names = { level = "allow" , priority = 1 } |
| 158 | too_many_arguments = { level = "allow" , priority = 1 } |
| 159 | too_many_lines = { level = "allow" , priority = 1 } |
| 160 | type_complexity = { level = "allow" , priority = 1 } |
| 161 | unreadable_literal = { level = "allow" , priority = 1 } |
| 162 | |