Sign in
android
/
toolchain
/
rustc
/
2f3fdfeb95384b9046ea35b3532e23c652eca660
/
.
/
src
/
test
/
ui
/
const-generics
/
defaults
/
const-param-in-ty-defaults.rs
blob: dbcab77dcd2ee0eeb06d8dfc6dcdd6f8a6e617c4 [
file
] [
log
] [
blame
]
// run-pass
#![
feature
(
const_generics_defaults
)]
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
]);
}