1 | [package] |
2 | name = "derive_utils" |
3 | version = "0.15.0" #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/derive_utils" |
8 | keywords = ["enum" , "macros" , "derive" ] |
9 | categories = ["development-tools::procedural-macro-helpers" , "rust-patterns" ] |
10 | exclude = ["/.*" , "/tools" ] |
11 | description = "" " |
12 | A procedural macro helper for easily writing derive macros for enums. |
13 | " "" |
14 | |
15 | [package.metadata.docs.rs] |
16 | targets = ["x86_64-unknown-linux-gnu" ] |
17 | |
18 | [package.metadata.cargo_check_external_types] |
19 | # The following are external types that are allowed to be exposed in our public API. |
20 | allowed_external_types = [ |
21 | "proc_macro2::*" , |
22 | "quote::*" , |
23 | "syn::*" , |
24 | ] |
25 | |
26 | [lib] |
27 | doc-scrape-examples = false |
28 | |
29 | # Note: proc-macro2, quote, and syn are public dependencies. |
30 | [dependencies] |
31 | proc-macro2 = "1.0.60" |
32 | quote = "1.0.25" |
33 | syn = { version = "2" , default-features = false, features = ["parsing" , "printing" , "clone-impls" , "proc-macro" , "full" ] } |
34 | |
35 | [dev-dependencies] |
36 | example_derive = { path = "examples/example_derive" } |
37 | rustversion = "1" |
38 | trybuild = { git = "https://github.com/taiki-e/trybuild.git" , branch = "dev" } # adjust overwrite behavior |
39 | |
40 | [lints] |
41 | workspace = true |
42 | |
43 | [workspace] |
44 | resolver = "2" |
45 | members = ["examples/example" , "examples/example_derive" ] |
46 | |
47 | # This table is shared by projects under github.com/taiki-e. |
48 | # It is not intended for manual editing. |
49 | [workspace.lints.rust] |
50 | deprecated_safe = "warn" |
51 | improper_ctypes = "warn" |
52 | improper_ctypes_definitions = "warn" |
53 | non_ascii_idents = "warn" |
54 | rust_2018_idioms = "warn" |
55 | single_use_lifetimes = "warn" |
56 | unexpected_cfgs = { level = "warn" , check-cfg = [ |
57 | ] } |
58 | unnameable_types = "warn" |
59 | unreachable_pub = "warn" |
60 | # 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 |
61 | [workspace.lints.clippy] |
62 | all = "warn" # Downgrade deny-by-default lints |
63 | pedantic = "warn" |
64 | as_ptr_cast_mut = "warn" |
65 | as_underscore = "warn" |
66 | default_union_representation = "warn" |
67 | inline_asm_x86_att_syntax = "warn" |
68 | trailing_empty_array = "warn" |
69 | transmute_undefined_repr = "warn" |
70 | undocumented_unsafe_blocks = "warn" |
71 | unused_trait_names = "warn" |
72 | # Suppress buggy or noisy clippy lints |
73 | bool_assert_comparison = { level = "allow" , priority = 1 } |
74 | borrow_as_ptr = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286 |
75 | cast_lossless = { level = "allow" , priority = 1 } # https://godbolt.org/z/Pv6vbGG6E |
76 | declare_interior_mutable_const = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7665 |
77 | doc_markdown = { level = "allow" , priority = 1 } |
78 | float_cmp = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725 |
79 | 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 |
80 | lint_groups_priority = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920 |
81 | manual_assert = { level = "allow" , priority = 1 } |
82 | manual_range_contains = { level = "allow" , priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/6455#issuecomment-1225966395 |
83 | missing_errors_doc = { level = "allow" , priority = 1 } |
84 | module_name_repetitions = { level = "allow" , priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+module_name_repetitions |
85 | naive_bytecount = { level = "allow" , priority = 1 } |
86 | nonminimal_bool = { level = "allow" , priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+nonminimal_bool |
87 | range_plus_one = { level = "allow" , priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+range_plus_one |
88 | similar_names = { level = "allow" , priority = 1 } |
89 | single_match = { level = "allow" , priority = 1 } |
90 | single_match_else = { level = "allow" , priority = 1 } |
91 | struct_excessive_bools = { level = "allow" , priority = 1 } |
92 | struct_field_names = { level = "allow" , priority = 1 } |
93 | too_many_arguments = { level = "allow" , priority = 1 } |
94 | too_many_lines = { level = "allow" , priority = 1 } |
95 | type_complexity = { level = "allow" , priority = 1 } |
96 | unreadable_literal = { level = "allow" , priority = 1 } |
97 | |