Skip to content

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

Closed
@nikomatsakis

Description

@nikomatsakis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions