Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
const-generics
/
defaults
/
const-param-in-ty-defaults.rs
blob: 1720109c6f48fe313521f248b6979d2cd063a74e [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
struct
Foo
<
const
N
:
usize
,
T
=
[
u8
;
N
]>(
T
);
impl
<
const
N
:
usize
>
Foo
<
N
>
{
fn
new
()
->
Self
{
Foo
([
0
;
N
])
}
}
fn
main
()
{
assert_eq
!(
Foo
::
new
().
0
,
[
0
;
10
]);
}