Struct stc_ts_file_analyzer::analyzer::stmt::return_type::ReturnValues
source · [−]pub(in analyzer) struct ReturnValues {
should_generalize: bool,
pub return_types: Vec<Type>,
yield_types: Vec<Type>,
pub(super) in_conditional: bool,
}
Fields
should_generalize: bool
If all cases are handled, return literal
like return 5
and never
type is used, we should not generalize the return value.
return_types: Vec<Type>
yield_types: Vec<Type>
in_conditional: bool
Are we in if or switch statement?
Trait Implementations
sourceimpl AddAssign<ReturnValues> for ReturnValues
impl AddAssign<ReturnValues> for ReturnValues
sourcefn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresourceimpl Debug for ReturnValues
impl Debug for ReturnValues
sourceimpl Default for ReturnValues
impl Default for ReturnValues
sourcefn default() -> ReturnValues
fn default() -> ReturnValues
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ReturnValues
impl Send for ReturnValues
impl Sync for ReturnValues
impl Unpin for ReturnValues
impl UnwindSafe for ReturnValues
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more