//@ check-pass use std::convert::TryFrom; pub trait FieldElement { type Integer: TryFrom; fn valid_integer_try_from(i: N) -> Result where Self::Integer: TryFrom, { Self::Integer::try_from(i).map_err(|_| ()) } } fn main() {}