summary refs log tree commit diff
path: root/src/test/compile-fail/fn-constraint.rs
blob: 2843ef93ea6c0121cdd9fc5c6aa76108e1270466 (plain)
1
2
3
4
5
6
7
8
9
10
// error-pattern:precondition constraint (for example, uint::le(a, b)
use std;
import str::*;

fn main() unsafe {
    fn foo(_a: uint, _b: uint) : uint::le(_a, _b) {}
    let a: uint = 4u;
    let b: uint = 1u;
    log(error, foo(a, b));
}