summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/issue-81943.rs
blob: 18f5970a350a2f8cb4d8e32bb0e896383a02d5d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// aux-build:issue-81943-lib.rs
extern crate issue_81943_lib as lib;

fn f<F: Fn(i32)>(f: F) { f(0); }
fn g(t: i32) -> i32 { t }
fn main() {
  f(|x| lib::d!(x)); //~ERROR
  f(|x| match x { tmp => { g(tmp) } }); //~ERROR
  macro_rules! d {
    ($e:expr) => { match $e { x => { g(x) } } } //~ERROR
  }
  f(|x| d!(x));
}