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