Module rustc_typeck::check::wfcheck
source · [−]Structs
Helper type of a temporary returned by .for_item(...).
This is necessary because we can’t write the following bound:
TypeVisitor that looks for uses of GATs like
<P0 as Trait<P1..Pn>>::GAT<Pn..Pm> and adds the arguments P0..Pm into
the two vectors, regions and types (depending on their kind). For each
parameter Pi also track the index i.
Constants
Functions
Checks all associated type defaults of trait trait_def_id.
Feature gates RFC 2056 – trivial bounds, checking for global bounds that aren’t true.
Require that the user writes where clauses on GATs for the implicit
outlives bounds involving trait parameters in trait functions and
lifetimes passed as GAT substs. See self-outlives-lint test.
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:
Detect when an object unsafe trait is referring to itself in one of its associated items.
When this is done, suggest using Self instead.
In a type definition, we check that to ensure that the types of the fields are well-formed.
Checks where-clauses and inline bounds that are declared on def_id.
Returns whether receiver_ty would be considered a valid receiver type for self_ty. If
arbitrary_self_types is enabled, receiver_ty must transitively deref to self_ty, possibly
through a *const/mut T raw pointer. If the feature is not enabled, the requirements are more
strict: receiver_ty must implement Receiver and directly implement
Deref<Target = self_ty>.
Given a known param_env and a set of well formed types, can we prove that
region_a outlives region_b
Given a known param_env and a set of well formed types, set up an
InferCtxt, call the passed function (to e.g. set up region constraints
to be tested), then resolve region and return errors
Given a known param_env and a set of well formed types, can we prove that
ty outlives region.