Enum rustc_typeck::check::Expectation
[−]
[src]
pub enum Expectation<'tcx> { NoExpectation, ExpectHasType(Ty<'tcx>), ExpectCastableToType(Ty<'tcx>), ExpectRvalueLikeUnsized(Ty<'tcx>), }
Unstable (
rustc_private
)When type-checking an expression, we propagate downward
whatever type hint we are able in the form of an Expectation
.
Variants
NoExpectation
Unstable (
rustc_private
)We know nothing about what type this expression should have.
ExpectHasType(Ty<'tcx>)
Unstable (
rustc_private
)This expression should have the type given (or some subtype)
ExpectCastableToType(Ty<'tcx>)
Unstable (
rustc_private
)This expression will be cast to the Ty
ExpectRvalueLikeUnsized(Ty<'tcx>)
Unstable (
rustc_private
)This rvalue expression will be wrapped in &
or Box
and coerced
to &Ty
or Box<Ty>
, respectively. Ty
is [A]
or Trait
.
Trait Implementations
Derived Implementations
impl<'tcx> Debug for Expectation<'tcx>
[src]
impl<'tcx> Clone for Expectation<'tcx>
[src]
fn clone(&self) -> Expectation<'tcx>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more