Ok @Albin Stjerna I released Polonius v0.7.0, so we can try to open the rustc PR
Ok Albin Stjerna I released Polonius v0.7.0, so we can try to open the rustc PR
There is a bit more work than just version-bumping: Polonius
Output is now generic with respect to a variable index type, and I'm not sure what to use. I guess something like
LocationIndex in the
locationmodule, but this is one of the things I got stuck on when I tried to follow the existing liveness logic because as I understand it, it never uses global IDs for variables that we could use for Polonius?
Nevermind, I got thrown by a weird compile error:
error[E0277]: the trait bound `rustc::ty::RegionVid: polonius_engine::facts::Atom` is not satisfied --> src/librustc_mir/borrow_check/nll/constraint_generation.rs:16:1 | 16 | / pub(super) fn generate_constraints<'cx, 'gcx, 'tcx>( 17 | | infcx: &InferCtxt<'cx, 'gcx, 'tcx>, 18 | | liveness_constraints: &mut LivenessValues<RegionVid>, 19 | | all_facts: &mut Option<AllFacts>, ... | 34 | | } 35 | | } | |_^ the trait `polonius_engine::facts::Atom` is not implemented for `rustc::ty::RegionVid` | = note: required by `polonius_engine::facts::AllFacts`
(I'm heading off to work and some errands soon, but in case you come back before I have Figured It All Out: this is weird, as the compiler is complaining that the Atom trait is not implemented for the RegionVids, which it is, and moreover, neither the code defining the trait nor the RegionVids has changed)
@Albin Stjerna my guess would be that there are two distinct versions of
polonius-engine in use
probably in different
Yes of course, because there are many of them
Makes total sense
Yep, that seems to have been the problem. Building
OK: pull request up!