summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/nesting.rs
blob: 27bdd5fa483b744ac1ddc6943fb165e90be34654 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-pass
#![allow(dead_code)]

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());
}