c12276cee537290eb11988e05897729981ac21f4
[rust-lightning] / src / util / internal_traits.rs
1 /// A simple marker trait that indicates a type requires no deallocation. Implies we can set_len()
2 /// on a Vec of these things and will be safe to overwrite them with =.
3 pub unsafe trait NoDealloc {}
4
5 /// Just call with test_no_dealloc::<Type>(None)
6 #[inline]
7 pub fn test_no_dealloc<T : NoDealloc>(_: Option<T>) { }