]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/trailing-question-in-macro-type.rs
Auto merge of #100678 - GuillaumeGomez:improve-rustdoc-json-tests, r=aDotInTheVoid
[rust.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 }