//@ check-pass //@ compile-flags: -Z validate-mir #![feature(let_chains)] fn lambda() -> U where T: Default, U: Default, { let foo: Result = Ok(T::default()); let baz: U = U::default(); if let Ok(foo) = foo && let Ok(bar) = transform(foo) { bar } else { baz } } fn transform(input: T) -> Result { todo!() } fn main() {}