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.
Activity
compiler-errors commentedon Nov 4, 2022
This very likely regressed in #92823, I'll put up a fix in like 30 mins.
compiler-errors commentedon Nov 4, 2022
For the record --
Bisection points at:
found 9 bors merge commits in the specified range
commit[0] 2022-02-27UTC: Auto merge of #94412 - scottmcm:cfg-out-miri-from-swap, r=oli-obk
commit[1] 2022-02-27UTC: Auto merge of #94157 - erikdesjardins:more-noundef, r=nikic
commit[2] 2022-02-28UTC: Auto merge of #94431 - matthiaskrgr:rollup-1jsj0wu, r=matthiaskrgr
commit[3] 2022-02-28UTC: Auto merge of #94437 - RalfJung:miri, r=RalfJung
commit[4] 2022-02-28UTC: Auto merge of #94158 - erikdesjardins:more-more-noundef, r=nikic
commit[5] 2022-02-28UTC: Auto merge of #94427 - cjgillot:inline-fresh-expn, r=oli-obk
commit[6] 2022-02-28UTC: Auto merge of #94216 - psumbera:sparc64-abi-fix2, r=nagisa
commit[7] 2022-02-28UTC: Auto merge of #94447 - matthiaskrgr:rollup-d8rj2xv, r=matthiaskrgr
commit[8] 2022-02-28UTC: Auto merge of #94453 - matthiaskrgr:rollup-xv9y98j, r=matthiaskrgr
Rageking8 commentedon Nov 5, 2022
@rustbot label +T-compiler +A-parser +A-lifetimes
Rollup merge of rust-lang#103986 - compiler-errors:oh-no-bad-block-sh…