format code after switching to edition 2024
All checks were successful
/ deps (pull_request) Successful in 16s
/ test (pull_request) Successful in 4m58s
/ deps (push) Successful in 14s
/ test (push) Successful in 5m23s

This commit is contained in:
Jacob Lifshay 2025-08-24 16:35:21 -07:00
parent ef85d11327
commit 4008c311bf
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
37 changed files with 213 additions and 199 deletions

View file

@ -1,27 +1,28 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
// See Notices.txt for copyright information
use crate::{
fold::{impl_fold, DoFold},
Errors, HdlAttr,
fold::{DoFold, impl_fold},
hdl_type_common::{
known_items, ParseFailed, ParseTypes, ParsedGenerics, ParsedType, TypesParser,
ParseFailed, ParseTypes, ParsedGenerics, ParsedType, TypesParser, known_items,
},
is_hdl_attr, kw,
module::{check_name_conflicts_with_module_builder, ModuleIO, ModuleIOKind, ModuleKind},
options, Errors, HdlAttr,
module::{ModuleIO, ModuleIOKind, ModuleKind, check_name_conflicts_with_module_builder},
options,
};
use num_bigint::BigInt;
use proc_macro2::{Span, TokenStream};
use quote::{quote, quote_spanned, ToTokens};
use quote::{ToTokens, quote, quote_spanned};
use std::{borrow::Borrow, convert::Infallible};
use syn::{
fold::{fold_expr, fold_expr_lit, fold_expr_unary, fold_local, fold_stmt, Fold},
Attribute, Block, Error, Expr, ExprIf, ExprLet, ExprLit, ExprRepeat, ExprUnary,
GenericArgument, Ident, Item, Lit, LitStr, Local, LocalInit, Pat, Token, Type, UnOp,
fold::{Fold, fold_expr, fold_expr_lit, fold_expr_unary, fold_local, fold_stmt},
parenthesized,
parse::{Parse, ParseStream},
parse_quote, parse_quote_spanned,
spanned::Spanned,
token::Paren,
Attribute, Block, Error, Expr, ExprIf, ExprLet, ExprLit, ExprRepeat, ExprUnary,
GenericArgument, Ident, Item, Lit, LitStr, Local, LocalInit, Pat, Token, Type, UnOp,
};
mod expand_aggregate_literals;

View file

@ -2,19 +2,18 @@
// See Notices.txt for copyright information
use crate::{
kw,
HdlAttr, kw,
module::transform_body::{
expand_match::{parse_enum_path, EnumPath},
ExprOptions, Visitor,
expand_match::{EnumPath, parse_enum_path},
},
HdlAttr,
};
use quote::{format_ident, quote_spanned};
use std::mem;
use syn::{
parse_quote_spanned, punctuated::Punctuated, spanned::Spanned, token::Paren, Expr, ExprArray,
ExprCall, ExprGroup, ExprMethodCall, ExprParen, ExprPath, ExprRepeat, ExprStruct, ExprTuple,
FieldValue, Token, TypePath,
Expr, ExprArray, ExprCall, ExprGroup, ExprMethodCall, ExprParen, ExprPath, ExprRepeat,
ExprStruct, ExprTuple, FieldValue, Token, TypePath, parse_quote_spanned,
punctuated::Punctuated, spanned::Spanned, token::Paren,
};
impl Visitor<'_> {

View file

@ -1,25 +1,25 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
// See Notices.txt for copyright information
use crate::{
fold::{impl_fold, DoFold},
Errors, HdlAttr, PairsIterExt,
fold::{DoFold, impl_fold},
kw,
module::transform_body::{
empty_let, with_debug_clone_and_fold, wrap_ty_with_expr, ExprOptions, Visitor,
ExprOptions, Visitor, empty_let, with_debug_clone_and_fold, wrap_ty_with_expr,
},
Errors, HdlAttr, PairsIterExt,
};
use proc_macro2::{Span, TokenStream};
use quote::{format_ident, quote_spanned, ToTokens, TokenStreamExt};
use quote::{ToTokens, TokenStreamExt, format_ident, quote_spanned};
use std::collections::BTreeSet;
use syn::{
fold::{fold_arm, fold_expr_match, fold_local, fold_pat, Fold},
Arm, Attribute, Expr, ExprMatch, FieldPat, Ident, Local, Member, Pat, PatIdent, PatOr,
PatParen, PatPath, PatRest, PatStruct, PatTuple, PatTupleStruct, PatWild, Path, PathSegment,
Token, TypePath,
fold::{Fold, fold_arm, fold_expr_match, fold_local, fold_pat},
parse_quote_spanned,
punctuated::Punctuated,
spanned::Spanned,
token::{Brace, Paren},
Arm, Attribute, Expr, ExprMatch, FieldPat, Ident, Local, Member, Pat, PatIdent, PatOr,
PatParen, PatPath, PatRest, PatStruct, PatTuple, PatTupleStruct, PatWild, Path, PathSegment,
Token, TypePath,
};
macro_rules! visit_trait {
@ -444,7 +444,7 @@ trait ParseMatchPat: Sized {
fn struct_(state: &mut HdlMatchParseState<'_>, v: MatchPatStruct) -> Result<Self, ()>;
fn tuple(state: &mut HdlMatchParseState<'_>, v: MatchPatTuple) -> Result<Self, ()>;
fn enum_variant(state: &mut HdlMatchParseState<'_>, v: MatchPatEnumVariant)
-> Result<Self, ()>;
-> Result<Self, ()>;
fn parse(state: &mut HdlMatchParseState<'_>, pat: Pat) -> Result<Self, ()> {
match pat {
Pat::Ident(PatIdent {