silence warning for enums with only one variant

This commit is contained in:
Jacob Lifshay 2026-02-23 16:07:05 -08:00
parent c632e5d570
commit 8c270b0e35
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
2 changed files with 11 additions and 0 deletions

View file

@ -888,6 +888,7 @@ impl ToTokens for ParsedEnum {
#(#sim_value_from_opaque_match_arms)*
}
}
#[allow(irrefutable_let_patterns)]
fn sim_value_clone_from_opaque(
&self,
value: &mut <Self as ::fayalite::ty::Type>::SimValue,

View file

@ -244,3 +244,13 @@ pub struct MyTypeWithPrivateMembersWithArg<T> {
pub(crate) b: MyPubCrateTypeWithArg<T>,
pub c: T,
}
#[hdl(outline_generated)]
pub enum EnumWithOnlyOneVariant {
A,
}
#[hdl(outline_generated)]
pub enum EnumWithOnlyOneVariant2<T> {
A(T),
}