Struct rustc_infer::traits::solve::Goal
source · pub struct Goal<'tcx, P> {
pub predicate: P,
pub param_env: ParamEnv<'tcx>,
}
Expand description
A goal is a statement, i.e. predicate
, we want to prove
given some assumptions, i.e. param_env
.
Most of the time the param_env
contains the where
-bounds of the function
we’re currently typechecking while the predicate
is some trait bound.
Fields§
§predicate: P
§param_env: ParamEnv<'tcx>
Trait Implementations§
source§impl<'tcx, P> From<Obligation<'tcx, P>> for Goal<'tcx, P>
impl<'tcx, P> From<Obligation<'tcx, P>> for Goal<'tcx, P>
source§fn from(value: Obligation<'tcx, P>) -> Self
fn from(value: Obligation<'tcx, P>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'tcx, P> !RefUnwindSafe for Goal<'tcx, P>
impl<'tcx, P> Send for Goal<'tcx, P>where P: Send,
impl<'tcx, P> Sync for Goal<'tcx, P>where P: Sync,
impl<'tcx, P> Unpin for Goal<'tcx, P>where P: Unpin,
impl<'tcx, P> !UnwindSafe for Goal<'tcx, P>
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
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.