[][src]Macro type_traits::needs_drop

macro_rules! needs_drop {
    ($type:ty) => { ... };
    ($val:expr$(,)?) => { ... };
}

Returns minimum alignment of the value at compile time..

Accepts both type and value.

Doesn't work with unsized values

Usage

use type_traits::needs_drop;
let array = [0u8; 4];
let string = "lolka".to_owned();

assert!(!needs_drop!(array,));
assert!(needs_drop!(string,));
assert!(!needs_drop!(string.as_bytes()[0]));