![]() Ignore NLL boring locals in polonius diagnostics Another easy one ``@jackh726`` (the diff is inflated by blessed test expectations don't worry :) NLLs don't compute liveness for boring locals, and therefore cannot find them in causes explaining borrows. In polonius, we don't have this liveness optimization (we may be able to do something partially similar in the future, e.g. for function parameters and the like), so we do encounter these in diagnostics even though we don't want to. This PR: - restructures the polonius context into per-phase data, in spirit as you requested in an earlier review - stores the locals NLLs would consider boring into the errors/diagnostics data - ignores these if a boring local is found when trying to explain borrows This PR fixes around 80 cases of diagnostics differences between `-Zpolonius=next` and NLLs. I've also added explicit revisions to a few polonius tests (both for the in-tree implementation as well as the datalog implementation -- even if we'll eventually remove them). I didn't do this for all the "dead" expectations that were removed from #136112 for that same reason, it's fine. I'll soon/eventually add explicit revisions where they're needed: there's only a handful of tests left to fix. r? ``@jackh726`` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |