# Enum rustc_infer::infer::region_constraints::VerifyBound

``````pub enum VerifyBound<'tcx> {
IfEq(Binder<'tcx, VerifyIfEq<'tcx>>),
OutlivedBy(Region<'tcx>),
IsEmpty,
AnyBound(Vec<VerifyBound<'tcx>>),
AllBounds(Vec<VerifyBound<'tcx>>),
}``````
Expand description

Describes the things that some `GenericKind` value `G` is known to outlive. Each variant of `VerifyBound` can be thought of as a function:

``fn(min: Region) -> bool { .. }``

where `true` means that the region `min` meets that `G: min`. (False means nothing.)

So, for example, if we have the type `T` and we have in scope that `T: 'a` and `T: 'b`, then the verify bound might be:

``````fn(min: Region) -> bool {
('a: min) || ('b: min)
}``````

This is described with an `AnyRegion('a, 'b)` node.

## Variants§

§

§

### OutlivedBy(Region<'tcx>)

Given a region `R`, expands to the function:

``````fn(min) -> bool {
R: min
}``````

This is used when we can establish that `G: R` – therefore, if `R: min`, then by transitivity `G: min`.

§

### IsEmpty

Given a region `R`, true if it is `'empty`.

§

### AnyBound(Vec<VerifyBound<'tcx>>)

Given a set of bounds `B`, expands to the function:

``````fn(min) -> bool {
exists (b in B) { b(min) }
}``````

In other words, if we meet some bound in `B`, that suffices. This is used when all the bounds in `B` are known to apply to `G`.

§

### AllBounds(Vec<VerifyBound<'tcx>>)

Given a set of bounds `B`, expands to the function:

``````fn(min) -> bool {
forall (b in B) { b(min) }
}``````

In other words, if we meet all bounds in `B`, that suffices. This is used when some bound in `B` is known to suffice, but we don’t know which.

source§

source

source

source

## Trait Implementations§

source§

### impl<'tcx> Clone for VerifyBound<'tcx>

source§

#### fn clone(&self) -> VerifyBound<'tcx>

Returns a copy of the value. Read more
1.0.0 · source§

#### fn clone_from(&mut self, source: &Self)

Performs copy-assignment from `source`. Read more
source§

### impl<'tcx> Debug for VerifyBound<'tcx>

source§

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

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

### impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for VerifyBound<'tcx>

source§

#### fn try_fold_with<__F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, __folder: &mut __F, ) -> Result<Self, __F::Error>

The entry point for folding. To fold a value `t` with a folder `f` call: `t.try_fold_with(f)`. Read more
source§

#### fn fold_with<F>(self, folder: &mut F) -> Selfwhere F: TypeFolder<I>,

A convenient alternative to `try_fold_with` for use with infallible folders. Do not override this method, to ensure coherence with `try_fold_with`.
source§

### impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for VerifyBound<'tcx>

source§

#### fn visit_with<__V: TypeVisitor<TyCtxt<'tcx>>>( &self, __visitor: &mut __V, ) -> __V::Result

The entry point for visiting. To visit a value `t` with a visitor `v` call: `t.visit_with(v)`. Read more

§

§

§

§

§

§

§

§

## Blanket Implementations§

source§

### impl<T> Aligned for T

source§

#### const ALIGN: Alignment = _

Alignment of `Self`.
source§

### impl<T> Any for Twhere T: 'static + ?Sized,

source§

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
source§

### impl<T> Borrow<T> for Twhere T: ?Sized,

source§

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

### impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

### impl<T, R> CollectAndApply<T, R> for T

source§

#### fn collect_and_apply<I, F>(iter: I, f: F) -> Rwhere I: Iterator<Item = T>, F: FnOnce(&[T]) -> R,

Equivalent to `f(&iter.collect::<Vec<_>>())`.

§

source§

### impl<T> Filterable for T

source§

#### fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
source§

### impl<T> From<T> for T

source§

#### fn from(t: T) -> T

Returns the argument unchanged.

source§

### impl<T> Instrument for T

source§

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

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

#### 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 Twhere 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§

source§

source§

### impl<'tcx, T> IsSuggestable<'tcx> for Twhere T: TypeVisitable<TyCtxt<'tcx>> + TypeFoldable<TyCtxt<'tcx>>,

source§

#### fn is_suggestable(self, tcx: TyCtxt<'tcx>, infer_suggestable: bool) -> bool

Whether this makes sense to suggest in a diagnostic. Read more
source§

source§

§

source§

source§

source§

### impl<T> Pointable for T

source§

#### const ALIGN: usize = _

The alignment of pointer.
§

#### type Init = T

The type for initializers.
source§

#### unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

#### unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

#### unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

#### unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

### impl<T> Same for T

§

#### type Output = T

Should always be `Self`
source§

### impl<T> ToOwned for Twhere T: Clone,

§

#### 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 Twhere U: Into<T>,

§

#### 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 Twhere U: TryFrom<T>,

§

#### 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<I, T> TypeVisitableExt<I> for Twhere I: Interner, T: TypeVisitable<I>,

source§

source§

#### fn has_vars_bound_at_or_above(&self, binder: DebruijnIndex) -> bool

Returns `true` if `self` has any late-bound regions that are either bound by `binder` or bound by some binder outside of `binder`. If `binder` is `ty::INNERMOST`, this indicates whether there are any late-bound regions that appear free.
source§

source§

#### fn has_vars_bound_above(&self, binder: DebruijnIndex) -> bool

Returns `true` if this type has any regions that escape `binder` (and hence are not bound by it).
source§

#### fn has_escaping_bound_vars(&self) -> bool

Return `true` if this type has regions that are not a part of the type. For example, `for<'a> fn(&'a i32)` return `false`, while `fn(&'a i32)` would return `true`. The latter can occur when traversing through the former. Read more
source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

#### fn has_free_regions(&self) -> bool

“Free” regions in this context means that it has any region that is not (a) erased or (b) late-bound.
source§

source§

#### fn has_erasable_regions(&self) -> bool

True if there are any un-erased free regions.
source§

#### fn is_global(&self) -> bool

Indicates whether this value references only ‘global’ generic parameters that are the same regardless of what fn we are in. This is used for caching.
source§

#### fn has_bound_regions(&self) -> bool

True if there are any late-bound regions
source§

#### fn has_non_region_bound_vars(&self) -> bool

True if there are any late-bound non-region variables
source§

#### fn has_bound_vars(&self) -> bool

True if there are any bound variables
source§

#### fn still_further_specializable(&self) -> bool

Indicates whether this value still has parameters/placeholders/inference variables which could be replaced later, in a way that would change the results of `impl` specialization.
source§

source§

source§

source§

source§

source§

source§

source§

source§

### impl<T> WithSubscriber for T

source§

#### 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
source§

#### fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default `Subscriber` to this type, returning a `WithDispatch` wrapper. Read more
source§

source§

source§

## Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain `repr(...)` attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes

Size for each variant:

• `IfEq`: 24 bytes
• `OutlivedBy`: 8 bytes
• `IsEmpty`: 0 bytes
• `AnyBound`: 24 bytes
• `AllBounds`: 24 bytes