Module rustc_typeck::check::wfcheck[][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?

Re-exports

use check::Inherited;
use check::FnCtxt;
use constrained_type_params::identify_constrained_type_params;
use constrained_type_params::Parameter;
use hir::def_id::DefId;
use rustc::traits;
use rustc::traits::ObligationCauseCode;
use rustc::ty;
use rustc::ty::Lift;
use rustc::ty::Ty;
use rustc::ty::TyCtxt;
use rustc::ty::GenericParamDefKind;
use rustc::ty::subst::Substs;
use rustc::ty::util::ExplicitSelf;
use rustc::util::nodemap::FxHashSet;
use rustc::util::nodemap::FxHashSet;
use rustc::util::nodemap::FxHashMap;
use rustc::util::nodemap::FxHashMap;
use rustc::middle::lang_items;
use syntax::ast;
use syntax::feature_gate;
use syntax::feature_gate::GateIssue;
use syntax_pos::Span;
use errors::DiagnosticBuilder;
use errors::DiagnosticId;
use rustc::hir::intravisit;
use rustc::hir::intravisit::Visitor;
use rustc::hir::intravisit::NestedVisitorMap;
use rustc::hir;

Structs

AdtField [
Experimental
]
AdtVariant [
Experimental
]
CheckTypeWellFormedVisitor [
Experimental
]
CheckWfFcxBuilder [
Experimental
]

Helper type of a temporary returned by .for_item(...). Necessary because we can't write the following bound: F: for<'b, 'tcx> where 'gcx: 'tcx FnOnce(FnCtxt<'b, 'gcx, 'tcx>).

Functions

check_associated_item [
Experimental
]
check_false_global_bounds [
Experimental
]

Feature gates RFC 2056 - trivial bounds, checking for global bounds that aren't true.

check_fn_or_method [
Experimental
]
check_impl [
Experimental
]
check_impl_item [
Experimental
]
check_item_fn [
Experimental
]
check_item_type [
Experimental
]
check_item_well_formed [
Experimental
]

Checks that the field types (in a struct def'n) or argument types (in an enum def'n) are well-formed, meaning that they do not require any constraints not declared in the struct definition itself. For example, this definition would be illegal:

check_method_receiver [
Experimental
]
check_trait [
Experimental
]
check_trait_item [
Experimental
]
check_type_defn [
Experimental
]

In a type definition, we check that to ensure that the types of the fields are well-formed.

check_variances_for_type_defn [
Experimental
]
check_where_clauses [
Experimental
]

Checks where clauses and inline bounds that are declared on def_id.

error_194 [
Experimental
]
error_392 [
Experimental
]
for_id [
Experimental
]
for_item [
Experimental
]
reject_shadowing_parameters [
Experimental
]
report_bivariance [
Experimental
]