2018-09-06 07:41:12 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2018-09-06 07:41:12 -05:00
|
|
|
|
2018-06-07 18:10:18 -05:00
|
|
|
fn foo<T>(t: T) -> impl Into<[T; { const FOO: usize = 1; FOO }]> {
|
|
|
|
[t]
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bar() -> impl Into<[u8; { const FOO: usize = 1; FOO }]> {
|
|
|
|
[99]
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
println!("{:?}", foo(42).into());
|
|
|
|
println!("{:?}", bar().into());
|
|
|
|
}
|