Type Alias Goal

Source
pub type Goal<'tcx, P> = Goal<TyCtxt<'tcx>, P>;

Aliased Type§

struct Goal<'tcx, P> {
    pub param_env: ParamEnv<'tcx>,
    pub predicate: P,
}

Fields§

§param_env: ParamEnv<'tcx>§predicate: P

Implementations

Source§

impl<I, P> Goal<I, P>
where I: Interner,

Source

pub fn new( cx: I, param_env: <I as Interner>::ParamEnv, predicate: impl Upcast<I, P>, ) -> Goal<I, P>

Source

pub fn with<Q>(self, cx: I, predicate: impl Upcast<I, Q>) -> Goal<I, Q>

Updates the goal to one with a different predicate but the same param_env.

Trait Implementations§

Source§

impl<'tcx, P> From<Obligation<'tcx, P>> for Goal<'tcx, P>

Source§

fn from(value: Obligation<'tcx, P>) -> Self

Converts to this type from the input type.
Source§

impl<I, P> Clone for Goal<I, P>
where I: Interner, P: Clone,

Source§

fn clone(&self) -> Goal<I, P>

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<I, P> Debug for Goal<I, P>
where I: Interner, P: Debug,

Source§

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

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

impl<I, P, __D> Decodable<__D> for Goal<I, P>
where I: Interner, __D: TyDecoder<I = I>, <I as Interner>::ParamEnv: Decodable<__D>, P: Decodable<__D>,

Source§

fn decode(__decoder: &mut __D) -> Goal<I, P>

Source§

impl<I, P, __E> Encodable<__E> for Goal<I, P>
where I: Interner, __E: TyEncoder<I = I>, <I as Interner>::ParamEnv: Encodable<__E>, P: Encodable<__E>,

Source§

fn encode(&self, __encoder: &mut __E)

Source§

impl<I, P> Hash for Goal<I, P>
where I: Interner, P: Hash,

Source§

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

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<I, P, __CTX> HashStable<__CTX> for Goal<I, P>
where I: Interner, <I as Interner>::ParamEnv: HashStable<__CTX>, P: HashStable<__CTX>,

Source§

fn hash_stable( &self, __hcx: &mut __CTX, __hasher: &mut StableHasher<SipHasher128>, )

Source§

impl<I, P, J> Lift<J> for Goal<I, P>
where I: Interner, J: Interner, <I as Interner>::ParamEnv: Lift<J, Lifted = <J as Interner>::ParamEnv>, P: Lift<J, Lifted = P>,

Source§

type Lifted = Goal<J, P>

Source§

fn lift_to_interner(self, interner: J) -> Option<Goal<J, P>>

Source§

impl<I, P> PartialEq for Goal<I, P>
where I: Interner, P: PartialEq,

Source§

fn eq(&self, __other: &Goal<I, P>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<I, P> TypeFoldable<I> for Goal<I, P>
where I: Interner, <I as Interner>::ParamEnv: TypeFoldable<I>, P: TypeFoldable<I>,

Source§

fn try_fold_with<__F>( self, __folder: &mut __F, ) -> Result<Goal<I, P>, <__F as FallibleTypeFolder<I>>::Error>
where __F: FallibleTypeFolder<I>,

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) -> Self
where 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<I, P> TypeVisitable<I> for Goal<I, P>
where I: Interner, <I as Interner>::ParamEnv: TypeVisitable<I>, P: TypeVisitable<I>,

Source§

fn visit_with<__V>( &self, __visitor: &mut __V, ) -> <__V as TypeVisitor<I>>::Result
where __V: TypeVisitor<I>,

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

impl<I, P> Copy for Goal<I, P>
where I: Interner, P: Copy,

Source§

impl<I, P> Eq for Goal<I, P>
where I: Interner, P: Eq,

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.