Crate ra_ap_hir_ty[−][src]
The type system. We currently use this to infer types for completion, hover information and various assists.
Re-exports
pub use traits::TraitEnvironment; |
Modules
db | FIXME: write short doc here |
diagnostics | FIXME: write short doc here |
display | FIXME: write short doc here |
method_resolution | This module is concerned with finding methods that a given type provides. For details about how this works in rustc, see the method lookup page in the rustc guide and the corresponding code mostly in librustc_typeck/check/method/probe.rs. |
primitive | Defines primitive types, which have a couple of peculiarities: |
traits | Trait solving using Chalk. |
Structs
AdtId | The id for an Abstract Data Type (i.e. structs, unions and enums). |
AliasEq | |
Binders | |
BoundVar | Identifies a particular bound variable within a binder.
Variables are identified by the combination of a |
CallableSig | A function signature as seen by type inference: Several parameter types and one return type. |
Canonical | Basically a claim (currently not validated / checked) that the contained
type / trait ref contains no inference variables; any inference variables it
contained have been replaced by bound variables, and |
DebruijnIndex | References the binder at the given depth. The index is a de
Bruijn index, so it counts back through the in-scope binders,
with 0 being the innermost binder. This is used in impls and
the like. For example, if we had a rule like |
DynTy | |
FnPointer | |
GenericArg | |
InEnvironment | Something (usually a goal), along with an environment. |
InferenceResult | The result of type inference: A mapping from expressions and patterns to types. |
InferenceVar | The kinds of placeholders we need during type inference. There’s separate
values for general types, and for integer and float variables. The latter
two are used for inference of literal values (e.g. |
Interner | |
OpaqueTy | |
ProjectionTy | A “projection” type corresponds to an (unnormalized)
projection like |
QuantifiedWhereClauses | |
ReturnTypeImplTraits | |
SolutionVariables | |
Substitution | A list of substitutions for generic parameters. |
TraitRef | A trait with type parameters. This includes the |
Ty | |
TyBuilder | This is a builder for |
TyLoweringContext |
Enums
AliasTy | |
CallableDefId | |
DomainGoal | Something that needs to be proven (by Chalk) during type checking, e.g. that a certain type implements a certain trait. Proving the Obligation might result in additional information about inference variables. |
GenericArgData | |
Guidance | When a goal holds ambiguously (e.g., because there are multiple possible solutions), we issue a set of guidance back to type inference. |
ImplTraitId | |
ImplTraitLoweringMode | |
Lifetime | |
Mutability | Whether a type is mutable or not. |
Safety | Whether a function is safe or not. |
Scalar | Types of scalar values. |
Solution | A (possible) solution for a proposed goal. |
TyDefId | |
TyKind | A type. |
TyVariableKind | Represents some extra knowledge we may have about the type variable. |
ValueTyDefId | |
WhereClause | Like |
Traits
Cast | The |
TyExt | |
TypeWalk | This allows walking structures that contain types to do something with those
types, similar to Chalk’s |
Functions
associated_type_shorthand_candidates | |
autoderef | |
callable_item_sig | Build the signature of a callable item (function, struct or enum variant). |
could_unify | |
from_assoc_type_id | |
from_chalk_trait_id | |
from_foreign_def_id | |
from_placeholder_idx | |
param_idx | Return an index of a parameter in the generic type parameter list by it’s id. |
to_assoc_type_id | |
to_chalk_trait_id | |
to_foreign_def_id | |
to_placeholder_idx |
Type Definitions
AssocTypeId | |
CanonicalVarKinds | |
ChalkTraitId | |
ClosureId | |
FnDefId | |
FnSig | |
ForeignDefId | |
OpaqueTyId | |
PlaceholderIndex | |
PolyFnSig | A polymorphic function signature. |
QuantifiedWhereClause |