fix using #[hdl] types like S<{ 1 + 2 }>
This commit is contained in:
parent
5bd0de48b7
commit
20cf0abbcc
|
@ -4163,7 +4163,13 @@ impl MakeHdlTypeExpr for ParsedExpr {
|
||||||
match self {
|
match self {
|
||||||
ParsedExpr::Delimited(expr) => expr.make_hdl_type_expr(context),
|
ParsedExpr::Delimited(expr) => expr.make_hdl_type_expr(context),
|
||||||
ParsedExpr::NamedParamConst(expr) => expr.make_hdl_type_expr(context),
|
ParsedExpr::NamedParamConst(expr) => expr.make_hdl_type_expr(context),
|
||||||
ParsedExpr::Other(expr) => (**expr).clone(),
|
ParsedExpr::Other(expr) => {
|
||||||
|
let span = expr.span();
|
||||||
|
let const_usize = known_items::ConstUsize(span);
|
||||||
|
parse_quote_spanned! {expr.span()=>
|
||||||
|
#const_usize::<{ #expr }>
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue