1 // `&&` and `||` were previously forbidden in constants alongside let bindings.
5 #![feature(const_if_match)]
6 #![feature(const_panic)]
10 let _ = true && { x = 1; false };
15 let x = true && false || true;
19 const fn truthy() -> bool {
20 let x = true || return false;
24 const fn falsy() -> bool {
25 let x = true && return false;
30 const _: () = assert!(Y);
33 const _: () = assert!(X == 1);
36 const _: () = assert!(truthy());
37 const _: () = assert!(!falsy());
38 assert!(truthy() && !falsy());