File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,8 @@ fn f<F: Fn(i32)>(f: F) { f(0); }
22fn main ( ) {
33 f ( |x| dbg ! ( x) ) ; //~ERROR
44 f ( |x| match x { tmp => { tmp } } ) ; //~ERROR
5+ macro_rules! d {
6+ ( $e: expr) => { match $e { x => { x } } }
7+ }
8+ f ( |x| d ! ( x) ) ; //~ERROR
59}
Original file line number Diff line number Diff line change @@ -15,6 +15,20 @@ LL | f(|x| match x { tmp => { tmp } });
1515 | | expected `()`, found `i32`
1616 | expected this to be `()`
1717
18- error: aborting due to 2 previous errors
18+ error[E0308]: mismatched types
19+ --> $DIR/issue-81943.rs:6:38
20+ |
21+ LL | ($e:expr) => { match $e { x => { x } } }
22+ | ------------------^----- help: consider using a semicolon here
23+ | | |
24+ | | expected `()`, found `i32`
25+ | expected this to be `()`
26+ LL | }
27+ LL | f(|x| d!(x));
28+ | ----- in this macro invocation
29+ |
30+ = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
31+
32+ error: aborting due to 3 previous errors
1933
2034For more information about this error, try `rustc --explain E0308`.
You can’t perform that action at this time.
0 commit comments