Skip to main content

ConstantExprKind

Enum ConstantExprKind 

Source
pub enum ConstantExprKind {
Show 25 variants Bool(bool), Integer(IntegerValue), Char(char), Float(FloatValue), Adt(Option<VariantId>, Vec<ConstantExpr>), Array(Vec<ConstantExpr>), Ref(ConstantExpr, Option<UnsizingMetadata>), Ptr(RefKind, ConstantExpr, Option<UnsizingMetadata>), Str(String), ByteStr(Vec<u8>), FnDef(FnPtr), FnPtr(FnPtr), PtrNoProvenance(u128), TypeId(Ty), RawMemory(Vec<Byte>), Var(ConstGenericDbVar), Global(GlobalDeclRef), Call(FnPtr, Vec<ConstantExpr>), TraitConst(TraitRef, AssocConstId), VTableRef(TraitRef), Discriminant(TypeDeclRef, VariantId), SizeOf(Ty), AlignOf(Ty), OffsetOf(TypeDeclRef, Option<VariantId>, FieldId), Opaque(String),
}

Variants§

§

Bool(bool)

Boolean value.

§

Integer(IntegerValue)

Integer value.

§

Char(char)

Char value.

§

Float(FloatValue)

Float value.

§

Adt(Option<VariantId>, Vec<ConstantExpr>)

Value of an ADT (struct or enum).

This is eliminated inside functions if --raw-consts is off.

§

Array(Vec<ConstantExpr>)

Array value.

This is eliminated inside functions if --raw-consts is off.

§

Ref(ConstantExpr, Option<UnsizingMetadata>)

A shared reference to a constant value.

This is eliminated inside functions if --raw-consts is off.

§

Ptr(RefKind, ConstantExpr, Option<UnsizingMetadata>)

A pointer to a static.

This is eliminated inside functions if --raw-consts is off.

§

Str(String)

str value.

§

ByteStr(Vec<u8>)

Byte string value.

§

FnDef(FnPtr)

ZST constant corresponding to the unique value of the type of a function item.

§

FnPtr(FnPtr)

A function pointer value; this is a pointer (i.e. an address).

This is eliminated inside functions if --raw-consts is off.

§

PtrNoProvenance(u128)

A pointer with no provenance (e.g. 0 for the null pointer)

This is eliminated inside functions if --raw-consts is off.

§

TypeId(Ty)

The TypeId value for a type.

§

RawMemory(Vec<Byte>)

Raw memory value obtained from constant evaluation. Used when a more structured representation isn’t possible (e.g. for unions) or just isn’t implemented yet.

§

Var(ConstGenericDbVar)

A const generic var

§

Global(GlobalDeclRef)

The value of a constant/static.

This is eliminated inside functions if --raw-consts is off.

§

Call(FnPtr, Vec<ConstantExpr>)

A call to a const fn.

§

TraitConst(TraitRef, AssocConstId)

A trait associated constant.

E.g.:

impl Foo for Bar {
  const C : usize = 32; // <-
}
§

VTableRef(TraitRef)

A reference to the vtable static item for this trait ref. This can be normalized if we emitted a vtable item.

This is eliminated if --raw-consts is off.

§

Discriminant(TypeDeclRef, VariantId)

The integer discriminant value corresponding to this enum variant.

§

SizeOf(Ty)

The size of the given type.

§

AlignOf(Ty)

The alignment of the given type.

§

OffsetOf(TypeDeclRef, Option<VariantId>, FieldId)

The offset of the given field.

§

Opaque(String)

A constant expression that Charon doesn’t handle, along with the reason why.

Implementations§

Source§

impl ConstantExprKind

Source

pub fn variant_name(&self) -> &'static str

Source§

impl ConstantExprKind

Source

pub fn is_bool(&self) -> bool

Source

pub fn is_integer(&self) -> bool

Source

pub fn is_char(&self) -> bool

Source

pub fn is_float(&self) -> bool

Source

pub fn is_adt(&self) -> bool

Source

pub fn is_array(&self) -> bool

Source

pub fn is_ref(&self) -> bool

Source

pub fn is_ptr(&self) -> bool

Source

pub fn is_str(&self) -> bool

Source

pub fn is_byte_str(&self) -> bool

Source

pub fn is_fn_def(&self) -> bool

Source

pub fn is_fn_ptr(&self) -> bool

Source

pub fn is_ptr_no_provenance(&self) -> bool

Source

pub fn is_type_id(&self) -> bool

Source

pub fn is_raw_memory(&self) -> bool

Source

pub fn is_var(&self) -> bool

Source

pub fn is_global(&self) -> bool

Source

pub fn is_call(&self) -> bool

Source

pub fn is_trait_const(&self) -> bool

Source

pub fn is_vtable_ref(&self) -> bool

Source

pub fn is_discriminant(&self) -> bool

Source

pub fn is_size_of(&self) -> bool

Source

pub fn is_align_of(&self) -> bool

Source

pub fn is_offset_of(&self) -> bool

Source

pub fn is_opaque(&self) -> bool

Source§

impl ConstantExprKind

Source

pub fn as_bool(&self) -> Option<&bool>

Source

pub fn as_integer(&self) -> Option<&IntegerValue>

Source

pub fn as_char(&self) -> Option<&char>

Source

pub fn as_float(&self) -> Option<&FloatValue>

Source

pub fn as_adt(&self) -> Option<(&Option<VariantId>, &Vec<ConstantExpr>)>

Source

pub fn as_array(&self) -> Option<&Vec<ConstantExpr>>

Source

pub fn as_ref(&self) -> Option<(&ConstantExpr, &Option<UnsizingMetadata>)>

Source

pub fn as_ptr( &self, ) -> Option<(&RefKind, &ConstantExpr, &Option<UnsizingMetadata>)>

Source

pub fn as_str(&self) -> Option<&String>

Source

pub fn as_byte_str(&self) -> Option<&Vec<u8>>

Source

pub fn as_fn_def(&self) -> Option<&FnPtr>

Source

pub fn as_fn_ptr(&self) -> Option<&FnPtr>

Source

pub fn as_ptr_no_provenance(&self) -> Option<&u128>

Source

pub fn as_type_id(&self) -> Option<&Ty>

Source

pub fn as_raw_memory(&self) -> Option<&Vec<Byte>>

Source

pub fn as_var(&self) -> Option<&ConstGenericDbVar>

Source

pub fn as_global(&self) -> Option<&GlobalDeclRef>

Source

pub fn as_call(&self) -> Option<(&FnPtr, &Vec<ConstantExpr>)>

Source

pub fn as_trait_const(&self) -> Option<(&TraitRef, &AssocConstId)>

Source

pub fn as_vtable_ref(&self) -> Option<&TraitRef>

Source

pub fn as_discriminant(&self) -> Option<(&TypeDeclRef, &VariantId)>

Source

pub fn as_size_of(&self) -> Option<&Ty>

Source

pub fn as_align_of(&self) -> Option<&Ty>

Source

pub fn as_offset_of( &self, ) -> Option<(&TypeDeclRef, &Option<VariantId>, &FieldId)>

Source

pub fn as_opaque(&self) -> Option<&String>

Source§

impl ConstantExprKind

Source

pub fn as_bool_mut(&mut self) -> Option<&mut bool>

Source

pub fn as_integer_mut(&mut self) -> Option<&mut IntegerValue>

Source

pub fn as_char_mut(&mut self) -> Option<&mut char>

Source

pub fn as_float_mut(&mut self) -> Option<&mut FloatValue>

Source

pub fn as_adt_mut( &mut self, ) -> Option<(&mut Option<VariantId>, &mut Vec<ConstantExpr>)>

Source

pub fn as_array_mut(&mut self) -> Option<&mut Vec<ConstantExpr>>

Source

pub fn as_ref_mut( &mut self, ) -> Option<(&mut ConstantExpr, &mut Option<UnsizingMetadata>)>

Source

pub fn as_ptr_mut( &mut self, ) -> Option<(&mut RefKind, &mut ConstantExpr, &mut Option<UnsizingMetadata>)>

Source

pub fn as_str_mut(&mut self) -> Option<&mut String>

Source

pub fn as_byte_str_mut(&mut self) -> Option<&mut Vec<u8>>

Source

pub fn as_fn_def_mut(&mut self) -> Option<&mut FnPtr>

Source

pub fn as_fn_ptr_mut(&mut self) -> Option<&mut FnPtr>

Source

pub fn as_ptr_no_provenance_mut(&mut self) -> Option<&mut u128>

Source

pub fn as_type_id_mut(&mut self) -> Option<&mut Ty>

Source

pub fn as_raw_memory_mut(&mut self) -> Option<&mut Vec<Byte>>

Source

pub fn as_var_mut(&mut self) -> Option<&mut ConstGenericDbVar>

Source

pub fn as_global_mut(&mut self) -> Option<&mut GlobalDeclRef>

Source

pub fn as_call_mut(&mut self) -> Option<(&mut FnPtr, &mut Vec<ConstantExpr>)>

Source

pub fn as_trait_const_mut( &mut self, ) -> Option<(&mut TraitRef, &mut AssocConstId)>

Source

pub fn as_vtable_ref_mut(&mut self) -> Option<&mut TraitRef>

Source

pub fn as_discriminant_mut( &mut self, ) -> Option<(&mut TypeDeclRef, &mut VariantId)>

Source

pub fn as_size_of_mut(&mut self) -> Option<&mut Ty>

Source

pub fn as_align_of_mut(&mut self) -> Option<&mut Ty>

Source

pub fn as_offset_of_mut( &mut self, ) -> Option<(&mut TypeDeclRef, &mut Option<VariantId>, &mut FieldId)>

Source

pub fn as_opaque_mut(&mut self) -> Option<&mut String>

Source§

impl ConstantExprKind

Source

pub fn from_bits(scalar_ty: &ScalarTy, bits: u128) -> Option<Self>

Trait Implementations§

Source§

impl AstVisitable for ConstantExprKind

Source§

fn drive<V: VisitAst>(&self, v: &mut V) -> ControlFlow<V::Break>

Recursively visit this type with the provided visitor. This calls the visitor’s visit_$any method if it exists, otherwise visit_inner.
Source§

fn drive_mut<V: VisitAstMut>(&mut self, v: &mut V) -> ControlFlow<V::Break>

Recursively visit this type with the provided visitor. This calls the visitor’s visit_$any method if it exists, otherwise visit_inner.
Source§

fn drive_two<V: ZipAst>(&self, other: &Self, v: &mut V) -> ControlFlow<V::Break>

Recursively visit this type with the provided visitor. This calls the visitor’s visit_$any method if it exists, otherwise visit_inner.
Source§

fn name(&self) -> &'static str

The name of the type, used for debug logging.
Source§

fn dyn_visit<T: AstVisitable>(&self, f: impl FnMut(&T))
where Self: Sized,

Visit all occurrences of that type inside self, in pre-order traversal.
Source§

fn dyn_visit_mut<T: AstVisitable>(&mut self, f: impl FnMut(&mut T))
where Self: Sized,

Visit all occurrences of that type inside self, in pre-order traversal.
Source§

impl Clone for ConstantExprKind

Source§

fn clone(&self) -> ConstantExprKind

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 Debug for ConstantExprKind

Source§

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

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

impl<'de, __State: ?Sized> DeserializeState<'de, __State> for ConstantExprKind
where bool: DeserializeState<'de, __State>, IntegerValue: Deserialize<'de>, char: DeserializeState<'de, __State>, FloatValue: Deserialize<'de>, Option<VariantId>: DeserializeState<'de, __State>, Vec<ConstantExpr>: DeserializeState<'de, __State>, ConstantExpr: DeserializeState<'de, __State>, Option<UnsizingMetadata>: DeserializeState<'de, __State>, RefKind: DeserializeState<'de, __State>, String: DeserializeState<'de, __State>, Vec<u8>: DeserializeState<'de, __State>, FnPtr: DeserializeState<'de, __State>, u128: DeserializeState<'de, __State>, Ty: DeserializeState<'de, __State>, Vec<Byte>: DeserializeState<'de, __State>, ConstGenericDbVar: DeserializeState<'de, __State>, GlobalDeclRef: DeserializeState<'de, __State>, TraitRef: DeserializeState<'de, __State>, AssocConstId: DeserializeState<'de, __State>, TypeDeclRef: DeserializeState<'de, __State>, VariantId: DeserializeState<'de, __State>, FieldId: DeserializeState<'de, __State>,

Source§

fn deserialize_state<__D>( __state: &__State, __deserializer: __D, ) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Source§

impl<'s, V> Drive<'s, V> for ConstantExprKind
where V: Visitor + Visit<'s, bool> + Visit<'s, IntegerValue> + Visit<'s, char> + Visit<'s, FloatValue> + Visit<'s, Option<VariantId>> + Visit<'s, Vec<ConstantExpr>> + Visit<'s, ConstantExpr> + Visit<'s, Option<UnsizingMetadata>> + Visit<'s, RefKind> + Visit<'s, String> + Visit<'s, Vec<u8>> + Visit<'s, FnPtr> + Visit<'s, u128> + Visit<'s, Ty> + Visit<'s, Vec<Byte>> + Visit<'s, ConstGenericDbVar> + Visit<'s, GlobalDeclRef> + Visit<'s, TraitRef> + Visit<'s, AssocConstId> + Visit<'s, TypeDeclRef> + Visit<'s, VariantId> + Visit<'s, FieldId>,

Source§

fn drive_inner(&'s self, visitor: &mut V) -> ControlFlow<V::Break>

Call v.visit() on the immediate contents of self.
Source§

impl<'s, V> DriveMut<'s, V> for ConstantExprKind
where V: Visitor + VisitMut<'s, bool> + VisitMut<'s, IntegerValue> + VisitMut<'s, char> + VisitMut<'s, FloatValue> + VisitMut<'s, Option<VariantId>> + VisitMut<'s, Vec<ConstantExpr>> + VisitMut<'s, ConstantExpr> + VisitMut<'s, Option<UnsizingMetadata>> + VisitMut<'s, RefKind> + VisitMut<'s, String> + VisitMut<'s, Vec<u8>> + VisitMut<'s, FnPtr> + VisitMut<'s, u128> + VisitMut<'s, Ty> + VisitMut<'s, Vec<Byte>> + VisitMut<'s, ConstGenericDbVar> + VisitMut<'s, GlobalDeclRef> + VisitMut<'s, TraitRef> + VisitMut<'s, AssocConstId> + VisitMut<'s, TypeDeclRef> + VisitMut<'s, VariantId> + VisitMut<'s, FieldId>,

Source§

fn drive_inner_mut(&'s mut self, visitor: &mut V) -> ControlFlow<V::Break>

Call v.visit() on the immediate contents of self.
Source§

impl<'s, V> DriveTwo<'s, V> for ConstantExprKind
where V: Visitor<Break: Default> + VisitTwo<'s, bool> + VisitTwo<'s, IntegerValue> + VisitTwo<'s, char> + VisitTwo<'s, FloatValue> + VisitTwo<'s, Option<VariantId>> + VisitTwo<'s, Vec<ConstantExpr>> + VisitTwo<'s, ConstantExpr> + VisitTwo<'s, Option<UnsizingMetadata>> + VisitTwo<'s, RefKind> + VisitTwo<'s, String> + VisitTwo<'s, Vec<u8>> + VisitTwo<'s, FnPtr> + VisitTwo<'s, u128> + VisitTwo<'s, Ty> + VisitTwo<'s, Vec<Byte>> + VisitTwo<'s, ConstGenericDbVar> + VisitTwo<'s, GlobalDeclRef> + VisitTwo<'s, TraitRef> + VisitTwo<'s, AssocConstId> + VisitTwo<'s, TypeDeclRef> + VisitTwo<'s, VariantId> + VisitTwo<'s, FieldId>,

Source§

fn drive_two_inner( &'s self, other: &'s Self, visitor: &mut V, ) -> ControlFlow<V::Break>

Call v.visit() on the immediate contents of self and other, if they correspond. If the values don’t match up, this returns Break(Default::default()).
Source§

impl Eq for ConstantExprKind

Source§

impl From<DeBruijnVar<ConstGenericVarId>> for ConstantExprKind

Source§

fn from(x: ConstGenericDbVar) -> Self

Converts to this type from the input type.
Source§

impl Hash for ConstantExprKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ConstantExprKind

Source§

fn cmp(&self, other: &ConstantExprKind) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ConstantExprKind

Source§

fn eq(&self, other: &ConstantExprKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for ConstantExprKind

Source§

fn partial_cmp(&self, other: &ConstantExprKind) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<__State: ?Sized> SerializeState<__State> for ConstantExprKind
where bool: SerializeState<__State>, IntegerValue: Serialize, char: SerializeState<__State>, FloatValue: Serialize, Option<VariantId>: SerializeState<__State>, Vec<ConstantExpr>: SerializeState<__State>, ConstantExpr: SerializeState<__State>, Option<UnsizingMetadata>: SerializeState<__State>, RefKind: SerializeState<__State>, String: SerializeState<__State>, Vec<u8>: SerializeState<__State>, FnPtr: SerializeState<__State>, u128: SerializeState<__State>, Ty: SerializeState<__State>, Vec<Byte>: SerializeState<__State>, ConstGenericDbVar: SerializeState<__State>, GlobalDeclRef: SerializeState<__State>, TraitRef: SerializeState<__State>, AssocConstId: SerializeState<__State>, TypeDeclRef: SerializeState<__State>, VariantId: SerializeState<__State>, FieldId: SerializeState<__State>,

Source§

fn serialize_state<__S>( &self, __state: &__State, __serializer: __S, ) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Source§

impl StructuralPartialEq for ConstantExprKind

Source§

impl TryFrom<ConstantExprKind> for ConstGenericDbVar

Source§

type Error = ()

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

fn try_from(e: ConstantExprKind) -> Result<Self, Self::Error>

Performs the conversion.

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
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> Dedup for T
where T: Mappable + Clone + Eq + Hash,

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HashConsable for T
where T: Hash + PartialEq + Eq + Clone + Mappable,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Mappable for T
where T: Any + Send + Sync,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> TyVisitable for T
where T: AstVisitable,

Source§

fn visit_vars(&mut self, v: &mut impl VarsVisitor)

Visit the variables contained in self, as seen from the outside of self. This means that any variable bound inside self will be skipped, and all the seen De Bruijn indices will count from the outside of self.
Source§

fn substitute(self, generics: &GenericArgs) -> Self

Substitute the generic variables inside self by replacing them with the provided values. Note: if self is an item that comes from a TraitDecl, you must use substitute_with_self or substitute_inner_binder, otherwise you’ll get panics.
Source§

fn substitute_inner_binder(self, generics: &GenericArgs) -> Self

Substitute the generic variables inside self by replacing them with the provided values. This is appropriate when substituting an inner binder.
Source§

fn substitute_explicits(self, generics: &GenericArgs) -> Self

Substitute only the type, region and const generic args.
Source§

fn substitute_with_self( self, generics: &GenericArgs, self_ref: &TraitRefKind, ) -> Self

Substitute the generic variables as well as the TraitRefKind::SelfId trait ref.
Source§

fn substitute_with_tref(self, tref: &TraitRef) -> Self

Substitute the generic variables as well as the TraitRefKind::SelfId trait ref.
Source§

fn try_substitute_with_tref( self, tref: &TraitRef, ) -> Result<Self, GenericsMismatch>

Substitute the generic variables as well as the TraitRefKind::SelfId trait ref.
Source§

fn try_substitute( self, generics: &GenericArgs, ) -> Result<Self, GenericsMismatch>

Source§

fn try_substitute_with_self( self, generics: &GenericArgs, self_ref: &TraitRefKind, ) -> Result<Self, GenericsMismatch>

Source§

fn move_under_binder(self) -> Self

Move under one binder.
Source§

fn move_under_binders(self, depth: DeBruijnId) -> Self

Move under depth binders.
Source§

fn move_from_under_binder(self) -> Option<Self>

Move from under one binder.
Source§

fn move_from_under_binders(self, depth: DeBruijnId) -> Option<Self>

Move the value out of depth binders. Returns None if it contains a variable bound in one of these depth binders.
Source§

fn visit_db_id<B>( &mut self, f: impl FnMut(&mut DeBruijnId) -> ControlFlow<B>, ) -> ControlFlow<B>

Visit the de Bruijn ids contained in self, as seen from the outside of self. This means that any variable bound inside self will be skipped, and all the seen indices will count from the outside of self.
Source§

fn replace_erased_regions(self, f: impl FnMut() -> Region) -> Self

Replace all the erased regions by the output of the provided function. Binders levels are handled automatically.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more