Closed
Description
I tried this code playground:
fn main() {
if let () = () 'a {}
if true 'a {}
loop 'a {}
while true 'a {}
while let () = () 'a {}
for _ in 0..0 'a {}
unsafe 'a {}
}
I expected to see this happen: The compiler rejects all these expressions as the lifetimes are in a nonsensical position.
Instead, this happened: The compiler accepted the expressions without saying anything
Meta
This behavior seems to occur since 1.61.
1.60 and below properly reject the code.