in propfuzz-macro/src/propfuzz_impl.rs [258:287]
fn new(param: &'a PatType) -> Result<Self> {
let ty = &*param.ty;
let mut errors = ErrorList::new();
let mut config_builder = ParamConfigBuilder::new(ty);
let (propfuzz_attrs, other_attrs) = param
.attrs
.iter()
.partition::<Vec<_>, _>(|attr| attr.path.is_ident("propfuzz"));
config_builder.apply_attrs(propfuzz_attrs, &mut errors);
// Non-propfuzz attributes on arguments aren't recognized (there's nowhere to put them!)
for attr in other_attrs {
errors.combine(Error::new_spanned(
attr,
"non-#[propfuzz] attributes are not supported",
));
}
errors.finish()?;
let config = config_builder.finish();
Ok(Self {
name_pat: ¶m.pat,
ty,
config,
})
}