Function
usage_error
(meta: &syn::meta::ParseNestedMeta, msg: &str)
Source from the content-addressed store, hash-verified
| 22 | } |
| 23 | |
| 24 | fn usage_error(meta: &syn::meta::ParseNestedMeta, msg: &str) -> syn::parse::Error { |
| 25 | meta.error(format_args!("{msg}. `#[collect(...)]` requires one mode (`require_static`, `no_drop`, or `unsafe_drop`) and optionally `bound = \"...\"`.")) |
| 26 | } |
| 27 | |
| 28 | // Deriving `Collect` must be done with care, because an implementation of `Drop` is not |
| 29 | // necessarily safe for `Collect` types. This derive macro has three available modes to ensure |
Tested by
no test coverage detected