From e185c3c96101fd2512e455870facc3a27da3c1c1 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Fri, 23 Apr 2021 13:45:44 -0400 Subject: [PATCH] Add 84434 Issue: rust-lang/rust#84434 --- ices/84434.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ices/84434.rs diff --git a/ices/84434.rs b/ices/84434.rs new file mode 100644 index 00000000..5a7dd08c --- /dev/null +++ b/ices/84434.rs @@ -0,0 +1,14 @@ +#![crate_type = "lib"] +use std::path::Path; +struct A { + pub func: fn(check: bool, a: &Path, b: Option<&Path>), +} +const MY_A: A = A { + func: |check, a, b| { + if check { + let _ = (); + } else if let Some(parent) = b.and_then(|p| p.parent()) { + let _ = (); + } + }, +};