]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/trailing-question-in-macro-type.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / 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 }