pub struct Term {
pub span: NodeSpan,
pub kind: TermKind,
}Expand description
An untyped term, and where the expression it was translated from was written.
In zelkova that source is the canonical AST. The span is what every constraint
generated from this term inherits, and therefore what a type error draws its
caret under; [NodeSpan::none] — a term built by hand, in a test — costs nothing
but the caret.
Fields§
§span: NodeSpan§kind: TermKindTrait Implementations§
Auto Trait Implementations§
impl Freeze for Term
impl RefUnwindSafe for Term
impl Send for Term
impl Sync for Term
impl Unpin for Term
impl UnsafeUnpin for Term
impl UnwindSafe for Term
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