rust/tests/ui/consts/self_normalization2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
238 B
Rust
Raw Normal View History

2019-07-26 05:57:42 +00:00
// check-pass
2019-03-22 17:33:12 +00:00
trait Gen<T> {
fn gen(x: Self) -> T;
}
struct A;
impl Gen<[(); 0]> for A {
fn gen(x: Self) -> [(); 0] {
[]
}
}
fn array() -> impl Gen<[(); 0]> {
A
}
fn main() {
let [] = Gen::gen(array());
}