]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-81943.rs
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / ui / typeck / issue-81943.rs
1 // aux-build:issue-81943-lib.rs
2 extern crate issue_81943_lib as lib;
3
4 fn f<F: Fn(i32)>(f: F) { f(0); }
5 fn g(t: i32) -> i32 { t }
6 fn main() {
7   f(|x| lib::d!(x)); //~ERROR
8   f(|x| match x { tmp => { g(tmp) } }); //~ERROR
9   macro_rules! d {
10     ($e:expr) => { match $e { x => { g(x) } } } //~ERROR
11   }
12   f(|x| d!(x));
13 }