]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/trailing-question-in-macro-type.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / parser / trailing-question-in-macro-type.rs
1 macro_rules! fn_expr {
2 ($return_type:ty : $body:expr) => {
3 (|| -> $return_type { $body })()
4 };
5 ($body:expr) => {
6 (|| $body)()
7 };
8 }
9
10
11 fn main() {
12 fn_expr!{ o?.when(|&i| i > 0)?.when(|&i| i%2 == 0) };
13 //~^ ERROR cannot find value `o` in this scope
14 }