[][src]Attribute Macro contracts::pre

#[pre]

Pre-conditions are checked before the function body is run.

Example

#[pre(elems.len() >= 1)]
fn max<T: Ord + Copy>(elems: &[T]) -> T {
   // ...
}