summaryrefslogtreecommitdiff
path: root/src/test/ui/generator/type-mismatch-signature-deduction.stderr
blob: 4abc0542c51425e36bc547249daa71e316ce90e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
error[E0308]: mismatched types
  --> $DIR/type-mismatch-signature-deduction.rs:13:9
   |
LL |         5
   |         ^ expected enum `std::result::Result`, found integer
   |
   = note: expected type `std::result::Result<{integer}, _>`
              found type `{integer}`
note: return type inferred to be `std::result::Result<{integer}, _>` here
  --> $DIR/type-mismatch-signature-deduction.rs:8:20
   |
LL |             return Ok(6);
   |                    ^^^^^

error[E0271]: type mismatch resolving `<[generator@$DIR/type-mismatch-signature-deduction.rs:6:5: 14:6] as Generator>::Return == i32`
  --> $DIR/type-mismatch-signature-deduction.rs:5:13
   |
LL | fn foo() -> impl Generator<Return = i32> {
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `i32`
   |
   = note: expected enum `std::result::Result<{integer}, _>`
              found type `i32`

error: aborting due to 2 previous errors

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