Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
try-from-int-error-partial-eq.rs
blob: 66a78b3f842fb9fd6ca3ee215e60915d5d892b1e [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
#![
allow
(
unused_must_use
)]
use
std
::
convert
::
TryFrom
;
use
std
::
num
::
TryFromIntError
;
fn
main
()
{
let
x
:
u32
=
125
;
let
y
:
Result
<
u8
,
TryFromIntError
>
=
u8
::
try_from
(
x
);
y
==
Ok
(
125
);
}