# Struct rustc_trait_selection::traits::query::type_op::prove_predicate::ProvePredicate

source ·

    pub struct ProvePredicate<'tcx> {
        pub predicate: Predicate<'tcx>,
    }

## Fields§

§`predicate: Predicate<'tcx>`

## Trait Implementations§

source§

### impl<'tcx> QueryTypeOp<'tcx> for ProvePredicate<'tcx>

§

#### type QueryResponse = ()

source§

#### fn try_fast_path( tcx: TyCtxt<'tcx>, key: &ParamEnvAnd<'tcx, Self> ) -> Option<Self::QueryResponse>

Give query the option for a simple fast path that never actually hits the tcx cache lookup etc. Return `Some(r)` with a final result or `None` to do the full path.
source§

#### fn perform_query( tcx: TyCtxt<'tcx>, canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Self>> ) -> Result<CanonicalQueryResponse<'tcx, ()>, NoSolution>

Performs the actual query with the canonicalized key – the real work happens here. This method is not given an `infcx` because it shouldn’t need one – and if it had access to one, it might do things like invoke `sub_regions`, which would be bad, because it would create subregion relationships that are not captured in the return value.
source§

#### fn perform_locally_with_next_solver( ocx: &ObligationCtxt<'_, 'tcx>, key: ParamEnvAnd<'tcx, Self> ) -> Result<Self::QueryResponse, NoSolution>

In the new trait solver, we already do caching in the solver itself, so there’s no need to canonicalize and cache via the query system. Additionally, even if we were to canonicalize, we’d still need to make sure to feed it predefined opaque types and the defining anchor and that would require duplicating all of the tcx queries. Instead, just perform these ops locally.
source§

#### fn fully_perform_into( query_key: ParamEnvAnd<'tcx, Self>, infcx: &InferCtxt<'tcx>, output_query_region_constraints: &mut QueryRegionConstraints<'tcx> ) -> Result<(Self::QueryResponse, Option<Canonical<'tcx, ParamEnvAnd<'tcx, Self>>>, PredicateObligations<'tcx>, Certainty), NoSolution>

## Auto Trait Implementations§

§

### impl<'tcx> !RefUnwindSafe for ProvePredicate<'tcx>

§

### impl<'tcx> Send for ProvePredicate<'tcx>

§

### impl<'tcx> Sync for ProvePredicate<'tcx>

§

### impl<'tcx> Unpin for ProvePredicate<'tcx>

§

### impl<'tcx> !UnwindSafe for ProvePredicate<'tcx>

## 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> From<T> for T

source§

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

Returns the argument unchanged.

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> ToOwned for T
where 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 T
where 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 T
where 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.

## 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: 8 bytes