Enum IntrinsicId
pub(in elab) enum IntrinsicId {
Box,
Array,
As,
IntCast,
IntToFloat,
Trunc,
Unknown(String),
}Expand description
Builtin intrinsic identifier used by semantic phases.
Variants§
Box
@box(expr) pointer allocation intrinsic.
Array
@array(init, len) array construction intrinsic.
As
@as(T, x) safe numeric cast intrinsic.
IntCast
@intCast(T, x) checked integer cast intrinsic.
IntToFloat
@intToFloat(T, x) integer-to-float cast intrinsic.
Trunc
@trunc(T, x) narrowing cast intrinsic.
Unknown(String)
Unknown intrinsic name preserved for diagnostics.
Implementations§
§impl IntrinsicId
impl IntrinsicId
pub fn known() -> &'static [IntrinsicId]
pub fn known() -> &'static [IntrinsicId]
Return all known intrinsics in stable display order.
pub fn parse(name: &str) -> IntrinsicId
pub fn parse(name: &str) -> IntrinsicId
Parse one intrinsic identifier from the @name tail.
pub fn signature(&self) -> Option<IntrinsicSignature>
pub fn signature(&self) -> Option<IntrinsicSignature>
Return required argument counts for known intrinsics.
pub fn summary(&self) -> Option<&'static str>
pub fn summary(&self) -> Option<&'static str>
Return one-line user-facing behavior text for docs and help.
pub fn is_numeric_cast(&self) -> bool
pub fn is_numeric_cast(&self) -> bool
Return whether this intrinsic belongs to numeric cast operations.
Trait Implementations§
§impl Clone for IntrinsicId
impl Clone for IntrinsicId
§fn clone(&self) -> IntrinsicId
fn clone(&self) -> IntrinsicId
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for IntrinsicId
impl Debug for IntrinsicId
§impl Hash for IntrinsicId
impl Hash for IntrinsicId
§impl PartialEq for IntrinsicId
impl PartialEq for IntrinsicId
impl Eq for IntrinsicId
impl StructuralPartialEq for IntrinsicId
Auto Trait Implementations§
impl Freeze for IntrinsicId
impl RefUnwindSafe for IntrinsicId
impl Send for IntrinsicId
impl Sync for IntrinsicId
impl Unpin for IntrinsicId
impl UnwindSafe for IntrinsicId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more