-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
closures accept ill-formed inputs #104478
Copy link
Copy link
Open
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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