closures accept ill-formed inputs #104478
Labels
A-borrow-checker
Area: The borrow checker
A-NLL
Area: Non-lexical lifetimes (NLL)
C-bug
Category: This is a bug.
NLL-sound
Working towards the "invalid code does not compile" goal
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Both of these closures should fail borrowck: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=e9855ecda2f9427454cebce7738e598d
I think we should simply do WF-checking of closure input/output types in the closure environment, but doing so would cause accidental breakages due to #104477. So #104477 should be resolved first.
@rustbot label A-NLL NLL-sound C-bug T-types A-borrow-checker
The text was updated successfully, but these errors were encountered: