@@ -2,32 +2,36 @@ error[E0308]: mismatched types
22 --> $DIR/issue-81943.rs:7:9
33 |
44LL | f(|x| lib::d!(x));
5- | -^^^^^^^^^^ expected `()`, found `i32`
6- | |
7- | help: try adding a return type: `-> i32`
5+ | ^^^^^^^^^^ expected `()`, found `i32`
86 |
97 = note: this error originates in the macro `lib::d` (in Nightly builds, run with -Z macro-backtrace for more info)
108
119error[E0308]: mismatched types
1210 --> $DIR/issue-81943.rs:8:28
1311 |
1412LL | f(|x| match x { tmp => { g(tmp) } });
15- | ^^^^^^ expected `()`, found `i32`
13+ | -------------------^^^^^^----
14+ | | |
15+ | | expected `()`, found `i32`
16+ | expected this to be `()`
1617 |
1718help: consider using a semicolon here
1819 |
1920LL | f(|x| match x { tmp => { g(tmp); } });
2021 | +
21- help: try adding a return type
22+ help: consider using a semicolon here
2223 |
23- LL | f(|x| -> i32 match x { tmp => { g(tmp) } });
24- | +++++ +
24+ LL | f(|x| match x { tmp => { g(tmp) } }; );
25+ | +
2526
2627error[E0308]: mismatched types
2728 --> $DIR/issue-81943.rs:10:38
2829 |
2930LL | ($e:expr) => { match $e { x => { g(x) } } }
30- | ^^^^ expected `()`, found `i32`
31+ | ------------------^^^^----
32+ | | |
33+ | | expected `()`, found `i32`
34+ | expected this to be `()`
3135LL | }
3236LL | f(|x| d!(x));
3337 | ----- in this macro invocation
@@ -37,10 +41,10 @@ help: consider using a semicolon here
3741 |
3842LL | ($e:expr) => { match $e { x => { g(x); } } }
3943 | +
40- help: try adding a return type
44+ help: consider using a semicolon here
4145 |
42- LL | f(|x| -> i32 d! (x));
43- | +++++ +
46+ LL | ($e:expr) => { match $e { x => { g (x) } }; }
47+ | +
4448
4549error: aborting due to 3 previous errors
4650
0 commit comments