Stream: t-compiler/wg-polonius

Topic: polonius v0.7.0 released


nikomatsakis (Apr 09 2019 at 21:42, on Zulip):

Ok @Albin Stjerna I released Polonius v0.7.0, so we can try to open the rustc PR

Albin Stjerna (Apr 10 2019 at 08:28, on Zulip):

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`
Albin Stjerna (Apr 10 2019 at 08:29, on Zulip):

(deleted)

Albin Stjerna (Apr 10 2019 at 11:06, on Zulip):

(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)

nikomatsakis (Apr 10 2019 at 13:25, on Zulip):

@Albin Stjerna my guess would be that there are two distinct versions of polonius-engine in use

nikomatsakis (Apr 10 2019 at 13:25, on Zulip):

probably in different Cargo.toml files

Albin Stjerna (Apr 10 2019 at 14:51, on Zulip):

Yes of course, because there are many of them

Albin Stjerna (Apr 10 2019 at 14:51, on Zulip):

Makes total sense

Albin Stjerna (Apr 10 2019 at 18:24, on Zulip):

Yep, that seems to have been the problem. Building rustc now!

Albin Stjerna (Apr 10 2019 at 20:51, on Zulip):

OK: pull request up!

Last update: Nov 15 2019 at 20:25UTC