pub struct Cleanup {
pub func: Option<Ident>,
pub range: SourceRange,
}Expand description
__attribute__((cleanup(f))): f(&x) runs when x goes out of scope.
Fields§
§func: Option<Ident>The function named, or None when the argument was not an identifier
at all — which GCC refuses with “cleanup argument not an identifier”.
range: SourceRangeWhere the attribute was written.
Trait Implementations§
impl StructuralPartialEq for Cleanup
Auto Trait Implementations§
impl Freeze for Cleanup
impl RefUnwindSafe for Cleanup
impl Send for Cleanup
impl Sync for Cleanup
impl Unpin for Cleanup
impl UnsafeUnpin for Cleanup
impl UnwindSafe for Cleanup
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