]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/printing-binder.stderr
Be more careful about unresolved exprs in suggestion
[rust.git] / src / test / ui / impl-trait / printing-binder.stderr
1 error[E0308]: mismatched types
2   --> $DIR/printing-binder.rs:10:18
3    |
4 LL | fn whatever() -> impl for<'a> Trait<'a> + for<'b> Trait<'b> {}
5    |                  ------------------------------------------ the found opaque type
6 ...
7 LL |     let x: u32 = whatever();
8    |            ---   ^^^^^^^^^^ expected `u32`, found opaque type
9    |            |
10    |            expected due to this
11    |
12    = note:     expected type `u32`
13            found opaque type `impl for<'a> Trait<'a> + for<'b> Trait<'b>`
14
15 error[E0308]: mismatched types
16   --> $DIR/printing-binder.rs:12:19
17    |
18 LL | fn whatever2() -> impl for<'c> Fn(&'c ()) {
19    |                   ----------------------- the found opaque type
20 ...
21 LL |     let x2: u32 = whatever2();
22    |             ---   ^^^^^^^^^^^ expected `u32`, found opaque type
23    |             |
24    |             expected due to this
25    |
26    = note:     expected type `u32`
27            found opaque type `impl for<'c> Fn(&'c ())`
28
29 error: aborting due to 2 previous errors
30
31 For more information about this error, try `rustc --explain E0308`.