Sign in
fuchsia
/
third_party
/
rust
/
346aec9b02f3c74f3fce97fd6bda24709d220e49
/
.
/
src
/
test
/
ui
/
associated-consts
/
associated-const-const-eval.rs
blob: 5a34bb97ca5dec2a8bc7a4077ce77d08b98ec429 [
file
] [
log
] [
blame
]
// run-pass
trait
Foo
{
const
NUM
:
usize
;
}
impl
Foo
for
i32
{
const
NUM
:
usize
=
1
;
}
const
FOO
:
usize
=
<
i32
as
Foo
>::
NUM
;
fn
main
()
{
assert_eq
!(
1
,
FOO
);
match
1
{
<
i32
as
Foo
>::
NUM
=>
{},
_
=>
assert
!(
false
)
}
}