1 // `&&` and `||` were previously forbidden in constants alongside let bindings.
5 #![feature(const_if_match)]
6 #![feature(const_panic)]
11 let _ = true && { x = 1; false };
16 let x = true && false || true;
20 const fn truthy() -> bool {
21 let x = true || return false;
25 const fn falsy() -> bool {
26 let x = true && return false;
31 const _: () = assert!(Y);
34 const _: () = assert!(X == 1);
37 const _: () = assert!(truthy());
38 const _: () = assert!(!falsy());
39 assert!(truthy() && !falsy());