forked from M-Labs/nac3
core/model: add SizeTModel::constant
This commit is contained in:
parent
679315acad
commit
b304df8bcc
@ -90,3 +90,11 @@ impl<'ctx> Model<'ctx> for SizeTModel<'ctx> {
|
||||
Ok(self.believe_value(value))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> SizeTModel<'ctx> {
|
||||
/// Create a constant value that inhabits this [`SizeTModel<'ctx>`].
|
||||
#[must_use]
|
||||
pub fn constant(&self, ctx: &'ctx Context, value: u64) -> SizeT<'ctx> {
|
||||
int_constant(ctx, *self, value)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user