@@ -2,32 +2,36 @@ error[E0308]: mismatched types
2
2
--> $DIR/issue-81943.rs:7:9
3
3
|
4
4
LL | f(|x| lib::d!(x));
5
- | -^^^^^^^^^^ expected `()`, found `i32`
6
- | |
7
- | help: try adding a return type: `-> i32`
5
+ | ^^^^^^^^^^ expected `()`, found `i32`
8
6
|
9
7
= note: this error originates in the macro `lib::d` (in Nightly builds, run with -Z macro-backtrace for more info)
10
8
11
9
error[E0308]: mismatched types
12
10
--> $DIR/issue-81943.rs:8:28
13
11
|
14
12
LL | f(|x| match x { tmp => { g(tmp) } });
15
- | ^^^^^^ expected `()`, found `i32`
13
+ | -------------------^^^^^^----
14
+ | | |
15
+ | | expected `()`, found `i32`
16
+ | expected this to be `()`
16
17
|
17
18
help: consider using a semicolon here
18
19
|
19
20
LL | f(|x| match x { tmp => { g(tmp); } });
20
21
| +
21
- help: try adding a return type
22
+ help: consider using a semicolon here
22
23
|
23
- LL | f(|x| -> i32 match x { tmp => { g(tmp) } });
24
- | +++++ +
24
+ LL | f(|x| match x { tmp => { g(tmp) } }; );
25
+ | +
25
26
26
27
error[E0308]: mismatched types
27
28
--> $DIR/issue-81943.rs:10:38
28
29
|
29
30
LL | ($e:expr) => { match $e { x => { g(x) } } }
30
- | ^^^^ expected `()`, found `i32`
31
+ | ------------------^^^^----
32
+ | | |
33
+ | | expected `()`, found `i32`
34
+ | expected this to be `()`
31
35
LL | }
32
36
LL | f(|x| d!(x));
33
37
| ----- in this macro invocation
@@ -37,10 +41,10 @@ help: consider using a semicolon here
37
41
|
38
42
LL | ($e:expr) => { match $e { x => { g(x); } } }
39
43
| +
40
- help: try adding a return type
44
+ help: consider using a semicolon here
41
45
|
42
- LL | f(|x| -> i32 d! (x));
43
- | +++++ +
46
+ LL | ($e:expr) => { match $e { x => { g (x) } }; }
47
+ | +
44
48
45
49
error: aborting due to 3 previous errors
46
50
0 commit comments