X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Fui%2Fmanual_unwrap_or.fixed;h=e7a29596b73ac50f8fdb1723c089e9425dbdf3bb;hb=84003aa7a18f2673b20340dd20344dda8265ba7a;hp=f1d3252230bc2b7a23c57fa0037c7daa05df0040;hpb=a362a4d1d0edb66aef186c1d27b28c60573078f4;p=rust.git diff --git a/tests/ui/manual_unwrap_or.fixed b/tests/ui/manual_unwrap_or.fixed index f1d3252230b..e7a29596b73 100644 --- a/tests/ui/manual_unwrap_or.fixed +++ b/tests/ui/manual_unwrap_or.fixed @@ -151,4 +151,16 @@ const fn const_fn_result_unwrap_or() { }; } +mod issue6965 { + macro_rules! some_macro { + () => { + if 1 > 2 { Some(1) } else { None } + }; + } + + fn test() { + let _ = some_macro!().unwrap_or(0); + } +} + fn main() {}