pub struct UseAfterMoveAnalysis { /* private fields */ }Expand description
Use-After-Move Analysis Engine
Walks function bodies in statement order, tracking when variables are consumed by ownership-taking functions and flagging subsequent uses.
Implementations§
Source§impl UseAfterMoveAnalysis
impl UseAfterMoveAnalysis
Sourcepub fn new() -> UseAfterMoveAnalysis
pub fn new() -> UseAfterMoveAnalysis
Create a new analysis instance
Sourcepub fn analyze_function(&mut self, func: &HirFunction) -> Vec<UseAfterMoveError>
pub fn analyze_function(&mut self, func: &HirFunction) -> Vec<UseAfterMoveError>
Analyze a function for use-after-move violations
Sourcepub fn errors(&self) -> &[UseAfterMoveError]
pub fn errors(&self) -> &[UseAfterMoveError]
Get the detected errors
Trait Implementations§
Source§impl Debug for UseAfterMoveAnalysis
impl Debug for UseAfterMoveAnalysis
Source§impl Default for UseAfterMoveAnalysis
impl Default for UseAfterMoveAnalysis
Source§fn default() -> UseAfterMoveAnalysis
fn default() -> UseAfterMoveAnalysis
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UseAfterMoveAnalysis
impl RefUnwindSafe for UseAfterMoveAnalysis
impl Send for UseAfterMoveAnalysis
impl Sync for UseAfterMoveAnalysis
impl Unpin for UseAfterMoveAnalysis
impl UnsafeUnpin for UseAfterMoveAnalysis
impl UnwindSafe for UseAfterMoveAnalysis
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more