1[package]
2name = "derive_more"
3version = "2.0.1"
4edition = "2021"
5rust-version = "1.75.0"
6description = "Adds #[derive(x)] macros for more traits"
7authors = ["Jelte Fennema <github-tech@jeltef.nl>"]
8license = "MIT"
9repository = "https://github.com/JelteF/derive_more"
10documentation = "https://docs.rs/derive_more"
11
12readme = "README.md"
13keywords = ["derive", "Add", "From", "Display", "IntoIterator"]
14categories = ["development-tools", "development-tools::procedural-macro-helpers", "no-std", "rust-patterns"]
15
16include = [
17 "src/**/*.rs",
18 "Cargo.toml",
19 "LICENSE",
20 "README.md",
21 "CHANGELOG.md",
22 "tests/**/*.rs", # debian packaging wants this
23 "examples/**/*.rs"
24]
25
26[workspace]
27members = ["impl"]
28
29[dependencies]
30derive_more-impl = { version = "=2.0.1", path = "impl" }
31
32[build-dependencies]
33rustc_version = { version = "0.4", optional = true }
34
35[dev-dependencies]
36rustversion = "1.0"
37static_assertions = "1.1"
38trybuild = "1.0.56"
39
40[badges]
41github = { repository = "JelteF/derive_more", workflow = "CI" }
42
43[package.metadata.docs.rs]
44features = ["full"]
45rustdoc-args = ["--cfg", "docsrs"]
46
47[package.metadata.playground]
48features = ["full", "std"]
49
50[lints.rust]
51unexpected_cfgs = { level = "warn", check-cfg = ["cfg(ci)", "cfg(nightly)"] }
52
53[features]
54default = ["std"]
55
56add = ["derive_more-impl/add"]
57add_assign = ["derive_more-impl/add_assign"]
58as_ref = ["derive_more-impl/as_ref"]
59constructor = ["derive_more-impl/constructor"]
60debug = ["derive_more-impl/debug"]
61deref = ["derive_more-impl/deref"]
62deref_mut = ["derive_more-impl/deref_mut"]
63display = ["derive_more-impl/display"]
64error = ["derive_more-impl/error"]
65from = ["derive_more-impl/from"]
66from_str = ["derive_more-impl/from_str"]
67index = ["derive_more-impl/index"]
68index_mut = ["derive_more-impl/index_mut"]
69into = ["derive_more-impl/into"]
70into_iterator = ["derive_more-impl/into_iterator"]
71is_variant = ["derive_more-impl/is_variant"]
72mul = ["derive_more-impl/mul"]
73mul_assign = ["derive_more-impl/mul_assign"]
74not = ["derive_more-impl/not"]
75sum = ["derive_more-impl/sum"]
76try_from = ["derive_more-impl/try_from"]
77try_into = ["derive_more-impl/try_into"]
78try_unwrap = ["derive_more-impl/try_unwrap"]
79unwrap = ["derive_more-impl/unwrap"]
80
81std = []
82full = [
83 "add",
84 "add_assign",
85 "as_ref",
86 "constructor",
87 "debug",
88 "deref",
89 "deref_mut",
90 "display",
91 "error",
92 "from",
93 "from_str",
94 "index",
95 "index_mut",
96 "into",
97 "into_iterator",
98 "is_variant",
99 "mul",
100 "mul_assign",
101 "not",
102 "sum",
103 "try_from",
104 "try_into",
105 "try_unwrap",
106 "unwrap",
107]
108
109testing-helpers = ["derive_more-impl/testing-helpers", "dep:rustc_version"]
110
111[[test]]
112name = "add"
113path = "tests/add.rs"
114required-features = ["add"]
115
116[[test]]
117name = "add_assign"
118path = "tests/add_assign.rs"
119required-features = ["add_assign"]
120
121[[test]]
122name = "as_mut"
123path = "tests/as_mut.rs"
124required-features = ["as_ref"]
125
126[[test]]
127name = "as_ref"
128path = "tests/as_ref.rs"
129required-features = ["as_ref"]
130
131[[test]]
132name = "boats_display_derive"
133path = "tests/boats_display_derive.rs"
134required-features = ["display"]
135
136[[test]]
137name = "constructor"
138path = "tests/constructor.rs"
139required-features = ["constructor"]
140
141[[test]]
142name = "debug"
143path = "tests/debug.rs"
144required-features = ["debug"]
145
146[[test]]
147name = "deref"
148path = "tests/deref.rs"
149required-features = ["deref"]
150
151[[test]]
152name = "deref_mut"
153path = "tests/deref_mut.rs"
154required-features = ["deref_mut"]
155
156[[test]]
157name = "display"
158path = "tests/display.rs"
159required-features = ["display"]
160
161[[test]]
162name = "error"
163path = "tests/error_tests.rs"
164required-features = ["error"]
165
166[[test]]
167name = "from"
168path = "tests/from.rs"
169required-features = ["from"]
170
171[[test]]
172name = "from_str"
173path = "tests/from_str.rs"
174required-features = ["from_str"]
175
176[[test]]
177name = "index_mut"
178path = "tests/index_mut.rs"
179required-features = ["index_mut"]
180
181[[test]]
182name = "index"
183path = "tests/index.rs"
184required-features = ["index"]
185
186[[test]]
187name = "into"
188path = "tests/into.rs"
189required-features = ["into"]
190
191[[test]]
192name = "into_iterator"
193path = "tests/into_iterator.rs"
194required-features = ["into_iterator"]
195
196[[test]]
197name = "is_variant"
198path = "tests/is_variant.rs"
199required-features = ["is_variant"]
200
201[[test]]
202name = "mul"
203path = "tests/mul.rs"
204required-features = ["mul"]
205
206[[test]]
207name = "mul_assign"
208path = "tests/mul_assign.rs"
209required-features = ["mul_assign"]
210
211[[test]]
212name = "not"
213path = "tests/not.rs"
214required-features = ["not"]
215
216[[test]]
217name = "sum"
218path = "tests/sum.rs"
219required-features = ["sum"]
220
221[[test]]
222name = "try_from"
223path = "tests/try_from.rs"
224required-features = ["try_from"]
225
226[[test]]
227name = "try_into"
228path = "tests/try_into.rs"
229required-features = ["try_into"]
230
231[[test]]
232name = "try_unwrap"
233path = "tests/try_unwrap.rs"
234required-features = ["try_unwrap"]
235
236[[test]]
237name = "unwrap"
238path = "tests/unwrap.rs"
239required-features = ["unwrap"]
240
241[[test]]
242name = "compile_fail"
243path = "tests/compile_fail/mod.rs"
244required-features = ["as_ref", "debug", "display", "from", "into", "is_variant", "try_from"]
245
246[[test]]
247name = "no_std"
248path = "tests/no_std.rs"
249required-features = ["full"]
250
251[[test]]
252name = "generics"
253path = "tests/generics.rs"
254required-features = ["full"]
255
256[[test]]
257name = "lib"
258path = "tests/lib.rs"
259required-features = ["full"]
260
261[[example]]
262name = "deny_missing_docs"
263path = "examples/deny_missing_docs.rs"
264required-features = ["full"]
265