]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-81943.stderr
Rollup merge of #107355 - JohnTitor:issue-60755, r=compiler-errors
[rust.git] / tests / ui / typeck / issue-81943.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-81943.rs:7:9
3    |
4 LL |   f(|x| lib::d!(x));
5    |         ^^^^^^^^^^ expected `()`, found `i32`
6    |
7    = note: this error originates in the macro `lib::d` (in Nightly builds, run with -Z macro-backtrace for more info)
8
9 error[E0308]: mismatched types
10   --> $DIR/issue-81943.rs:8:28
11    |
12 LL |   f(|x| match x { tmp => { g(tmp) } });
13    |         -------------------^^^^^^----
14    |         |                  |
15    |         |                  expected `()`, found `i32`
16    |         expected this to be `()`
17    |
18 help: consider using a semicolon here
19    |
20 LL |   f(|x| match x { tmp => { g(tmp); } });
21    |                                  +
22 help: consider using a semicolon here
23    |
24 LL |   f(|x| match x { tmp => { g(tmp) } };);
25    |                                      +
26
27 error[E0308]: mismatched types
28   --> $DIR/issue-81943.rs:10:38
29    |
30 LL |     ($e:expr) => { match $e { x => { g(x) } } }
31    |                    ------------------^^^^----
32    |                    |                 |
33    |                    |                 expected `()`, found `i32`
34    |                    expected this to be `()`
35 LL |   }
36 LL |   f(|x| d!(x));
37    |         ----- in this macro invocation
38    |
39    = note: this error originates in the macro `d` (in Nightly builds, run with -Z macro-backtrace for more info)
40 help: consider using a semicolon here
41    |
42 LL |     ($e:expr) => { match $e { x => { g(x); } } }
43    |                                          +
44 help: consider using a semicolon here
45    |
46 LL |     ($e:expr) => { match $e { x => { g(x) } }; }
47    |                                              +
48
49 error: aborting due to 3 previous errors
50
51 For more information about this error, try `rustc --explain E0308`.