summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/closure-return-type-mismatch.stderr
blob: 3a89d30a05d2042b7106730d21aabcf5b20b2306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error[E0308]: mismatched types
  --> $DIR/closure-return-type-mismatch.rs:7:9
   |
LL |         a
   |         ^ expected `&str`, found `bool`
   |
note: return type inferred to be `&str` here
  --> $DIR/closure-return-type-mismatch.rs:4:20
   |
LL |             return "test";
   |                    ^^^^^^

error[E0308]: mismatched types
  --> $DIR/closure-return-type-mismatch.rs:12:20
   |
LL |             return "hello"
   |                    ^^^^^^^ expected `bool`, found `&str`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.