summary refs log tree commit diff
path: root/tests/ui/impl-trait/method-resolution4.next.stderr
blob: b48de0af3579d536d58497365580a3ef61acc59f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
error[E0282]: type annotations needed
  --> $DIR/method-resolution4.rs:13:9
   |
LL |         foo(false).next().unwrap();
   |         ^^^^^^^^^^ cannot infer type

error[E0308]: mismatched types
  --> $DIR/method-resolution4.rs:16:5
   |
LL | fn foo(b: bool) -> impl Iterator<Item = ()> {
   |                    ------------------------ the expected opaque type
...
LL |     std::iter::empty()
   |     ^^^^^^^^^^^^^^^^^^ types differ
   |
   = note: expected opaque type `impl Iterator<Item = ()>`
                   found struct `std::iter::Empty<_>`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0282, E0308.
For more information about an error, try `rustc --explain E0282`.