pub struct FunctionSig {
pub param_types: Vec<InferType>,
pub return_type: InferType,
pub is_generic: bool,
pub param_modes: Vec<RirParamMode>,
pub param_comptime: Vec<bool>,
pub param_names: Vec<Spur>,
pub return_type_sym: Spur,
}Expand description
Information about a function during constraint generation.
Uses InferType rather than Type so that array types are represented
structurally (as InferType::Array { element, length }) rather than by
opaque IDs. This allows uniform handling during inference.
Fields§
§param_types: Vec<InferType>Parameter types (in order), as InferTypes for uniform handling.
return_type: InferTypeReturn type, as InferType for uniform handling.
is_generic: boolWhether this is a generic function (has comptime type parameters). Generic functions skip type checking during constraint generation - they’ll be checked during specialization.
param_modes: Vec<RirParamMode>Parameter modes (Normal, Inout, Borrow, Comptime).
param_comptime: Vec<bool>Which parameters are comptime (declared with comptime keyword).
This is separate from param_modes because comptime T: type sets
is_comptime=true but mode=Normal.
param_names: Vec<Spur>Parameter names, needed for type substitution in generic returns.
return_type_sym: SpurThe return type as a symbol (used for substitution lookup).
Trait Implementations§
Source§impl Clone for FunctionSig
impl Clone for FunctionSig
Source§fn clone(&self) -> FunctionSig
fn clone(&self) -> FunctionSig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FunctionSig
impl RefUnwindSafe for FunctionSig
impl Send for FunctionSig
impl Sync for FunctionSig
impl Unpin for FunctionSig
impl UnwindSafe for FunctionSig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef].