diff options
Diffstat (limited to 'tests/ui/typeck/issue-81943.rs')
-rw-r--r-- | tests/ui/typeck/issue-81943.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/typeck/issue-81943.rs b/tests/ui/typeck/issue-81943.rs new file mode 100644 index 000000000..18f5970a3 --- /dev/null +++ b/tests/ui/typeck/issue-81943.rs @@ -0,0 +1,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)); +} |