From 12b3ba57f1b9d53f8cda6c04b91bbebdb49ab637 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Sun, 1 Dec 2024 20:10:25 -0800 Subject: [PATCH] add some ExprCastTo supertraits to ResetType to make generic code easier --- crates/fayalite/src/reset.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/crates/fayalite/src/reset.rs b/crates/fayalite/src/reset.rs index b90d40e..9328365 100644 --- a/crates/fayalite/src/reset.rs +++ b/crates/fayalite/src/reset.rs @@ -1,8 +1,9 @@ // SPDX-License-Identifier: LGPL-3.0-or-later // See Notices.txt for copyright information use crate::{ - expr::{Expr, ToExpr}, - int::Bool, + clock::Clock, + expr::{ops, Expr, ToExpr}, + int::{Bool, SInt, UInt}, source_location::SourceLocation, ty::{impl_match_variant_as_self, CanonicalType, StaticType, Type, TypeProperties}, }; @@ -11,7 +12,19 @@ mod sealed { pub trait ResetTypeSealed {} } -pub trait ResetType: StaticType + sealed::ResetTypeSealed { +pub trait ResetType: + StaticType + + sealed::ResetTypeSealed + + ops::ExprCastTo + + ops::ExprCastTo + + ops::ExprCastTo + + ops::ExprCastTo + + ops::ExprCastTo + + ops::ExprCastTo> + + ops::ExprCastTo> + + ops::ExprCastTo + + ops::ExprCastTo +{ fn dispatch(input: D::Input, dispatch: D) -> D::Output; }