]> git.lizzy.rs Git - rust.git/blob - src/test/ui/existential-type/issue-52843-closure-constrain.rs
Rename test and add comment
[rust.git] / src / test / ui / existential-type / issue-52843-closure-constrain.rs
1 // Checks to ensure that we properly detect when a closure constrains an existential type
2 #![feature(existential_type)]
3
4 use std::fmt::Debug;
5
6 fn main() {
7     existential type Existential: Debug;
8     fn _unused() -> Existential { String::new() }
9     //~^ ERROR: concrete type differs from previous defining existential type use
10     let null = || -> Existential { 0 };
11     println!("{:?}", null());
12 }