Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Reintroduce a FCW system to borrowck

Metadata
Point of contactOli Scherer
StatusAccepted
Funding contactRustNL
Tracking issuerust-lang/rust-project-goals#713
Zulip channelN/A
compiler championOli Scherer
types championlcnr
Teamscompiler, types
Task ownersOli Scherer

Summary

When borrowck was transitioned to NLL, we had a system for turning some errors into warnings, if they only happened with NLL but not old borrowck and generally compare two impls of borrowck to make sure the errors match up.

Due to recent changes to borrowck (opaque type handling and borrowcking typeck children individually), the remains of the system for comparing two runs of borrowck can’t easily be used anymore for those purposes.

Motivation

The status quo

Fixing soundness bugs sometimes requires breaking changes. We want to carefully roll them out, so we would like to be able to run borrowck with the new system and if there were any errors, run it also with the old system and compare errors.

What we propose to do about it

I’m going to refactor the diagnostic reporting infra in borrowck and introduce a diagnostic comparison system.

Work items over the next year

TaskOwner(s)Notes
link all Diag<'infcx> to the borrowck root insteadOli Scherer
delay all diag reporting to the end of borrowckOli Scherermay change diagnostic order
add an enum for borrowck modes and a list of borrowck modes to try and compare errors betweenOli Schererwe don’t have anything to test this well, so I may need to test it with some dummy change

Team asks

TeamSupport levelNotes
compilermedium
typesmedium

Funding

PurposeCostFundedSponsor(s)
ReviewsAskPartial

Frequently asked questions