Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"explicit predicates of" and "predicates of" have the same dep-node #51409

Closed
nikomatsakis opened this issue Jun 7, 2018 · 1 comment
Closed

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jun 7, 2018

Both the explicit_predicates_of and predicates_of queries have the same dep-node:

[] fn predicates_of: PredicatesOfItem(DefId) -> ty::GenericPredicates<'tcx>,
[] fn explicit_predicates_of: PredicatesOfItem(DefId) -> ty::GenericPredicates<'tcx>,

This causes failures when the infer_outlives_requirements feature is used with incremental compilation. What needs to be done to fix this is the following:

  1. First, create a test.
  2. Second, create a new dep-node ExplicitPredicatesOfItem for this query.

Test

If we add a test in src/test/incremental sort of like this, it ought to fail:

// revisions: one 

// Regression test that `infer_outlives_predicates` can be used with
// incremental without an ICE.

#![feature(infer_outlives_requirements)]

struct Foo<'a, T> {
  x: &'a T 
}

fn main() { }

New dep-node

To make a new dep-node, you want to copy and paste this variant here:

[] PredicatesOfItem(DefId),

The compiler should then lead you on a little tour of what else needs to be modified.

cc @toidiu

bors added a commit that referenced this issue Jun 11, 2018
create separate dep-nodes for predicates_of and explicit_predicates_of

Fix for #51409

- added incremental compilation test for infer_outlives_requirements
- created separate dep-node for explicit_predicates_of
@Smibu
Copy link
Contributor

Smibu commented Dec 31, 2018

This can be closed; the fix message format of #51467 was slightly wrong so GitHub left this open.

@estebank estebank closed this as completed Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants