]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/coercion/issue-101066.rs
3 use std
::convert
::TryFrom
;
5 pub trait FieldElement
{
6 type Integer
: TryFrom
<usize, Error
= std
::num
::TryFromIntError
>;
8 fn valid_integer_try_from
<N
>(i
: N
) -> Result
<Self::Integer
, ()>
10 Self::Integer
: TryFrom
<N
>,
12 Self::Integer
::try_from(i
).map_err(|_
| ())