rust/src/test/compile-fail/fn-constraint.rs

11 lines
240 B
Rust
Raw Normal View History

2011-08-31 17:23:34 -05:00
// error-pattern:precondition constraint (for example, uint::le(a, b)
use std;
import str::*;
2012-02-01 05:53:09 -06:00
fn main() unsafe {
fn foo(_a: uint, _b: uint) : uint::le(_a, _b) {}
2011-07-27 07:19:39 -05:00
let a: uint = 4u;
let b: uint = 1u;
log(error, foo(a, b));
}