pub struct ResolvedFnDef {
pub fn_id: FnId,
pub name: String,
pub line: usize,
pub params: Vec<(String, Type)>,
pub return_type: Type,
pub effects: Vec<Spanned<String>>,
pub desc: Option<String>,
pub body: Arc<ResolvedFnBody>,
pub resolution: Option<FnResolution>,
}Expand description
Resolved fn definition. Mirrors crate::ast::FnDef but with
signature types parsed to Type (and resolved through the
owner module’s resolver context, see #148 round 6) instead of
source strings, plus the body lifted to ResolvedFnBody.
Fields§
§fn_id: FnIdStable opaque identity of this fn. The pre-resolve FnDef
only carried a source name; here we promote identity to a
first-class field.
name: StringSource-level fn name. Kept for diagnostics + backend codegen mangling.
line: usize§params: Vec<(String, Type)>Parameters: (binding_name, resolved_param_type). The
resolver canonicalises each annotation through the
declaring module’s own resolver context.
return_type: Type§effects: Vec<Spanned<String>>§desc: Option<String>§body: Arc<ResolvedFnBody>§resolution: Option<FnResolution>Slot-resolver output — see FnResolution. Carried through
unchanged.
Trait Implementations§
Source§impl Clone for ResolvedFnDef
impl Clone for ResolvedFnDef
Source§fn clone(&self) -> ResolvedFnDef
fn clone(&self) -> ResolvedFnDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolvedFnDef
impl Debug for ResolvedFnDef
Source§impl PartialEq for ResolvedFnDef
impl PartialEq for ResolvedFnDef
Source§fn eq(&self, other: &ResolvedFnDef) -> bool
fn eq(&self, other: &ResolvedFnDef) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResolvedFnDef
Auto Trait Implementations§
impl Freeze for ResolvedFnDef
impl RefUnwindSafe for ResolvedFnDef
impl Send for ResolvedFnDef
impl Sync for ResolvedFnDef
impl Unpin for ResolvedFnDef
impl UnsafeUnpin for ResolvedFnDef
impl UnwindSafe for ResolvedFnDef
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
Mutably borrows from an owned value. Read more