]> git.lizzy.rs Git - rust.git/blob - src/test/ui/existential-type/issue-52843-closure-constrain.stderr
Rename test and add comment
[rust.git] / src / test / ui / existential-type / issue-52843-closure-constrain.stderr
1 error: concrete type differs from previous defining existential type use
2   --> $DIR/issue-52843-closure-constrain.rs:8:5
3    |
4 LL |     fn _unused() -> Existential { String::new() }
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, got `std::string::String`
6    |
7 note: previous use here
8   --> $DIR/issue-52843-closure-constrain.rs:6:1
9    |
10 LL | / fn main() {
11 LL | |     existential type Existential: Debug;
12 LL | |     fn _unused() -> Existential { String::new() }
13 LL | |
14 LL | |     let null = || -> Existential { 0 };
15 LL | |     println!("{:?}", null());
16 LL | | }
17    | |_^
18
19 error: aborting due to previous error
20