add #[hdl(get(|v| ...))] type GetStuff<P: PhantomConstGet<MyStruct>> = MyType or DynSize;
This commit is contained in:
parent
d2c8b023bf
commit
094c77e26e
8 changed files with 600 additions and 58 deletions
|
|
@ -159,10 +159,14 @@ impl ParsedEnum {
|
|||
no_static: _,
|
||||
no_runtime_generics: _,
|
||||
cmp_eq,
|
||||
ref get,
|
||||
} = options.body;
|
||||
if let Some((cmp_eq,)) = cmp_eq {
|
||||
errors.error(cmp_eq, "#[hdl(cmp_eq)] is not yet implemented for enums");
|
||||
}
|
||||
if let Some((get, ..)) = get {
|
||||
errors.error(get, "#[hdl(get(...))] is not allowed on enums");
|
||||
}
|
||||
attrs.retain(|attr| {
|
||||
if attr.path().is_ident("repr") {
|
||||
errors.error(attr, "#[repr] is not supported on #[hdl] enums");
|
||||
|
|
@ -225,6 +229,7 @@ impl ToTokens for ParsedEnum {
|
|||
no_static,
|
||||
no_runtime_generics,
|
||||
cmp_eq: _, // TODO: implement cmp_eq for enums
|
||||
get: _,
|
||||
} = &options.body;
|
||||
let target = get_target(target, ident);
|
||||
let mut struct_attrs = attrs.clone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue