Skip to main content

EmptyTyDefDb

Struct EmptyTyDefDb 

Source
pub struct EmptyTyDefDb;
Expand description

Zero-state TyDefDb when running pure local CST inference without an external .ridx index.

Trait Implementations§

Source§

impl Clone for EmptyTyDefDb

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EmptyTyDefDb

Source§

impl Debug for EmptyTyDefDb

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EmptyTyDefDb

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl TyDefDb for EmptyTyDefDb

Source§

fn fn_sig( &self, _: GlobalDefId, _: &mut InferTyArena, _: &mut Vec<InferTyId>, ) -> Option<(u16, InferTyId)>

Function or associated function signature: appends parameter types to inputs_out and returns (generic_type_or_const_param_count, output_ty).
Source§

fn def_ty( &self, _: GlobalDefId, _: &mut InferTyArena, ) -> Option<(u16, CtorShapeKind, InferTyId)>

Definition type for an ADT (Struct/Enum/Union), Variant (returns owning Enum ADT type), TypeAlias (returns aliased target type), Const, or Static, along with (generic_count, ctor_shape).
Source§

fn ctor_tuple_fields( &self, _: GlobalDefId, _: &mut InferTyArena, _: &mut Vec<InferTyId>, ) -> Option<u16>

Tuple constructor field types for a tuple Struct or tuple Variant; returns generic_count.
Source§

fn field_ty( &self, _: GlobalDefId, _: &str, _: &mut InferTyArena, ) -> Option<(u16, InferTyId)>

Field type by name (or "0", "1" for tuple fields) on a Struct, Union, or Variant, returning (generic_count, field_ty) parameterized by Param { idx, .. }.
Source§

fn lang_item(&self, _: TyLangItem) -> Option<GlobalDefId>

Resolves a known compiler TyLangItem to its GlobalDefId.
Source§

fn lang_item_of_def(&self, _: GlobalDefId) -> Option<TyLangItem>

Reverse lookup: returns the TyLangItem tag of def, if def is a lang item.
Source§

fn project_assoc_ty( &self, _: TyLangItem, _: InferTyId, _: &[InferTyId], _: &mut InferTyArena, _: &mut UnionFindTable, ) -> Option<InferTyId>

Projects an associated type (TryOutput, FutureOutput, IntoFutureOutput, DerefTarget, IndexOutput, IntoIteratorItem, IteratorItem, or operator Output) for self_ty and trait_args.
Source§

fn param_fn_bound( &self, _: GlobalDefId, _: u16, _: &mut InferTyArena, _: &mut Vec<InferTyId>, ) -> Option<(TyLangItem, InferTyId)>

Queries an Fn* / AsyncFn* trait bound on generic parameter param_idx of owner_def, appending expected closure parameter types (containing Param { idx, .. }) to inputs_out and returning (fn_trait_item, ret_ty).
Source§

fn field_ty_and_def( &self, owner_def: GlobalDefId, name: &str, arena: &mut InferTyArena, ) -> Option<(u16, InferTyId, GlobalDefId)>

Field type + field GlobalDefId by name (or "0", "1" for tuple fields).
Source§

fn project_trait_assoc( &self, _trait_def: GlobalDefId, _assoc_def: GlobalDefId, _self_ty: InferTyId, _trait_args: &[InferTyId], _arena: &mut InferTyArena, _vars: &mut UnionFindTable, ) -> Option<InferTyId>

Projects an arbitrary trait associated type <self_ty as trait_def<trait_args>>::assoc_def.
Source§

fn inherent_method_cands( &self, _target: ImplTargetKey, _method_name: &str, _arena: &mut InferTyArena, _out: &mut Vec<MethodCand>, )

Appends inherent impl method candidates (has_self == true) matching (target, method_name).
Source§

fn trait_impl_method_cands( &self, _target: ImplTargetKey, _trait_def: GlobalDefId, _method_name: &str, _step_ty: InferTyId, _arena: &mut InferTyArena, _vars: &mut UnionFindTable, _out: &mut Vec<MethodCand>, )

Appends concrete and blanket impl Trait for ... method candidates (has_self == true) for trait_def (including supertraits of trait_def) matching (target, method_name) and compatible with step_ty.
Source§

fn trait_decl_method_cand( &self, _trait_def: GlobalDefId, _trait_args: &[InferTyId], _self_ty: InferTyId, _method_name: &str, _arena: &mut InferTyArena, ) -> Option<MethodCand>

Looks up method_name (has_self == true) directly on trait_def (or its supertraits) for Param/Dyn/Opaque receivers.
Source§

fn method_sig( &self, cand: &MethodCand, arena: &mut InferTyArena, inputs_out: &mut Vec<InferTyId>, ) -> Option<InferTyId>

Materializes cand.method_def’s formal parameter types (inputs_out[0] = self_param_ty) and return type.
Source§

fn trait_supertraits( &self, _trait_def: GlobalDefId, _out: &mut Vec<GlobalDefId>, )

Appends direct supertraits (and optional instantiated trait args) of trait_def.
Source§

fn param_trait_bounds( &self, _owner_def: GlobalDefId, _param_idx: u16, _out: &mut Vec<GlobalDefId>, )

Appends trait bounds Param(param_idx): BoundTrait declared on owner_def (Fn or AssocFn or Impl).
Source§

fn assoc_ty_parent_trait(&self, _assoc_def: GlobalDefId) -> Option<GlobalDefId>

Returns the parent Trait GlobalDefId of a trait associated type assoc_def.
Source§

fn assoc_ty_trait_bounds( &self, _assoc_def: GlobalDefId, _out: &mut Vec<GlobalDefId>, )

Appends trait bounds type Assoc: BoundTrait declared on trait associated type assoc_def.
Source§

fn check_blanket_method_bounds( &self, _cand: &MethodCand, _impl_subst: &[InferTyId], _arena: &mut InferTyArena, _vars: &mut UnionFindTable, ) -> bool

Verifies blanket-impl where bounds after binding impl_subst against a method receiver.
Source§

fn trait_of_assoc_fn(&self, _assoc_fn: GlobalDefId) -> Option<TraitAssocFnMeta>

Returns canonical trait AssocFn metadata if assoc_fn is a trait declaration method or a trait-impl override.
Source§

fn refine_inherent_assoc_fn( &self, assoc_fn: GlobalDefId, _qself_ty: InferTyId, _arena: &mut InferTyArena, _vars: &mut UnionFindTable, ) -> GlobalDefId

Refines an inherent AssocFn when multiple specialized inherent impl blocks exist for qself_ty (e.g. AtomicUsize::new).
Source§

fn trait_assoc_fn_by_name( &self, _trait_def: GlobalDefId, _fn_name: &str, ) -> Option<TraitAssocFnMeta>

Looks up canonical trait AssocFn metadata by (trait_def, fn_name) (including static methods without self).
Source§

fn owner_where_obligations( &self, _owner_def: GlobalDefId, _arena: &mut InferTyArena, _out: &mut Vec<WhereObligation>, )

Appends parameterized TraitBound and ProjectionEq where obligations declared on owner_def (and enclosing impl/trait).
Source§

fn impl_trait_bounds( &self, _cand: &MethodCand, _arena: &mut InferTyArena, _out: &mut Vec<WhereObligation>, )

The trait bounds of the indexed impl that cand belongs to, with the impl’s generic parameters as Param { idx } in the order check_blanket_method_bounds substitutes them.
Source§

fn solve_trait_obligation( &self, _trait_def: GlobalDefId, _self_ty: InferTyId, _trait_args: &[InferTyId], _arena: &mut InferTyArena, _vars: &mut UnionFindTable, ) -> bool

Solves <self_ty as trait_def<trait_args>> against concrete and bound-checked blanket impls (Checkbox 3.4), committing variable bindings into vars when a unique candidate impl matches.
Source§

fn project_param_assoc( &self, _owner_def: GlobalDefId, _param_idx: u16, _trait_def: GlobalDefId, _assoc_def: GlobalDefId, _trait_args: &[InferTyId], _arena: &mut InferTyArena, ) -> Option<InferTyId>

Projects <Param(param_idx) as trait_def<trait_args>>::assoc_def from owner_def’s ProjectionEq bounds.
Source§

fn cstr_def(&self) -> Option<GlobalDefId>

Optional core::ffi::CStr definition for c"..." literals (&CStr).
Source§

fn generic_param_default_ty( &self, _def: GlobalDefId, _param_idx: u16, _arena: &mut InferTyArena, ) -> Option<InferTyId>

Returns the parameterized default type (Param { idx: 0..param_idx }) declared on non-lifetime generic parameter param_idx of def (e.g. Global on Vec<T, A = Global>).
Source§

fn std_macro_ty( &self, kind: StdMacroTy, arena: &mut InferTyArena, ) -> Option<InferTyId>

Constructs a well-known stdlib macro result type (Vec<T, Global>, String, fmt::Arguments, fmt::Result, Option<&str>).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.