-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsNLL-diagnosticsWorking towards the "diagnostic parity" goalWorking towards the "diagnostic parity" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Description
As uncovered in #47689, two-phase borrows as implemented can lead to "extra" and confusing error messages. The problem is that each time we have a "gen " of the activation, we do the activation check -- but if there are two activations in a row, each of them can emit an error, when we only want an error from the first.
The HEAD~1
commit in branch issue-48418
on my repository fixes the problem, but probably not in a sound way, as discussed in this commit (and its successor).
The proper fix either involves adding a dominator check (suppress activation of bit B at A2 if it is dominated by another activation of bit B at A1), or else a "must activate" sort of analysis.
cc @pnkfelix
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsNLL-diagnosticsWorking towards the "diagnostic parity" goalWorking towards the "diagnostic parity" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.