This commit is contained in:
parent
f12322aa2a
commit
ed1aea41f3
12 changed files with 45 additions and 29 deletions
|
@ -58,8 +58,7 @@ impl ParsedBundle {
|
|||
}
|
||||
*mutability = FieldMutability::None;
|
||||
colon_token.get_or_insert(Token));
|
||||
let options = errors.unwrap_or_default(HdlAttr::parse_and_take_attr(attrs));
|
||||
options
|
||||
errors.unwrap_or_default(HdlAttr::parse_and_take_attr(attrs))
|
||||
}
|
||||
fn parse(item: ItemStruct) -> syn::Result<Self> {
|
||||
let ItemStruct {
|
||||
|
|
|
@ -600,7 +600,7 @@ impl ToTokens for ParsedEnum {
|
|||
static_generics.split_for_impl();
|
||||
let static_type_body_variants =
|
||||
Vec::from_iter(variants.iter().map(|ParsedVariant { ident, field, .. }| {
|
||||
if let Some(_) = field {
|
||||
if field.is_some() {
|
||||
quote_spanned! {span=>
|
||||
#ident: ::fayalite::ty::StaticType::TYPE,
|
||||
}
|
||||
|
|
|
@ -1410,7 +1410,7 @@ impl ParseTypes<Path> for ParsedType {
|
|||
let mut args = None;
|
||||
let segments = Punctuated::from_iter(segments.pairs_mut().map_pair_value_mut(|segment| {
|
||||
let PathSegment { ident, arguments } = segment;
|
||||
if let Some(_) = args {
|
||||
if args.is_some() {
|
||||
parser
|
||||
.errors()
|
||||
.error(&ident, "associated types/consts are not yet implemented");
|
||||
|
@ -1594,7 +1594,7 @@ impl ParseTypes<Path> for ParsedConstGenericType {
|
|||
let mut args = None;
|
||||
let segments = Punctuated::from_iter(segments.pairs_mut().map_pair_value_mut(|segment| {
|
||||
let PathSegment { ident, arguments } = segment;
|
||||
if let Some(_) = args {
|
||||
if args.is_some() {
|
||||
parser
|
||||
.errors()
|
||||
.error(&ident, "associated types/consts are not yet implemented");
|
||||
|
@ -3554,7 +3554,7 @@ impl SplitForImpl for Generics {
|
|||
Self::TypeGenerics<'_>,
|
||||
Self::WhereClause<'_>,
|
||||
) {
|
||||
Generics::split_for_impl(&self)
|
||||
Generics::split_for_impl(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue