[][src]Struct ra_ap_hir_ty::InferenceResult

pub struct InferenceResult {
    pub type_of_expr: ArenaMap<ExprId, Ty>,
    pub type_of_pat: ArenaMap<PatId, Ty>,
    // some fields omitted
}

The result of type inference: A mapping from expressions and patterns to types.

Fields

type_of_expr: ArenaMap<ExprId, Ty>type_of_pat: ArenaMap<PatId, Ty>

Implementations

impl InferenceResult[src]

pub fn method_resolution(&self, expr: ExprId) -> Option<FunctionId>[src]

pub fn field_resolution(&self, expr: ExprId) -> Option<FieldId>[src]

pub fn record_field_resolution(&self, expr: ExprId) -> Option<FieldId>[src]

pub fn record_field_pat_resolution(&self, pat: PatId) -> Option<FieldId>[src]

pub fn variant_resolution_for_expr(&self, id: ExprId) -> Option<VariantId>[src]

pub fn variant_resolution_for_pat(&self, id: PatId) -> Option<VariantId>[src]

pub fn assoc_resolutions_for_expr(&self, id: ExprId) -> Option<AssocItemId>[src]

pub fn assoc_resolutions_for_pat(&self, id: PatId) -> Option<AssocItemId>[src]

pub fn type_mismatch_for_expr(&self, expr: ExprId) -> Option<&TypeMismatch>[src]

pub fn add_diagnostics(
    &self,
    db: &dyn HirDatabase,
    owner: DefWithBodyId,
    sink: &mut DiagnosticSink<'_>
)
[src]

Trait Implementations

impl Clone for InferenceResult[src]

impl Debug for InferenceResult[src]

impl Default for InferenceResult[src]

impl Eq for InferenceResult[src]

impl Index<Idx<Expr>> for InferenceResult[src]

type Output = Ty

The returned type after indexing.

impl Index<Idx<Pat>> for InferenceResult[src]

type Output = Ty

The returned type after indexing.

impl PartialEq<InferenceResult> for InferenceResult[src]

impl StructuralEq for InferenceResult[src]

impl StructuralPartialEq for InferenceResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Cast for T[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.