Module rustc_typeck::variance::constraints[][src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Code to gather up constraints. Constraint construction and representation

The second pass over the AST determines the set of constraints. We walk the set of items and, for each member, generate new constraints.

Re-exports

use hir::def_id::DefId;
use rustc::ty::subst::Substs;
use rustc::ty::subst::UnpackedKind;
use rustc::ty;
use rustc::ty::Ty;
use rustc::ty::TyCtxt;
use syntax::ast;
use rustc::hir;
use rustc::hir::itemlikevisit::ItemLikeVisitor;
use super::terms::*;
use super::terms::VarianceTerm::*;

Structs

Constraint [
Experimental
]

Declares that the variable decl_id appears in a location with variance variance.

ConstraintContext [
Experimental
]
CurrentItem [
Experimental
]

To build constraints, we visit one item (type, trait) at a time and look at its contents. So e.g. if we have

Functions

add_constraints_from_crate [
Experimental
]