]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/complex.rs
`m1!{...}` -> `m1!(...)`
[rust.git] / src / test / run-pass / complex.rs
1
2
3
4 // -*- rust -*-
5 type t = int;
6
7 fn nothing() { }
8
9 fn putstr(s: ~str) { }
10
11 fn putint(i: int) {
12     let mut i: int = 33;
13     while i < 36 { putstr(~"hi"); i = i + 1; }
14 }
15
16 fn zerg(i: int) -> int { return i; }
17
18 fn foo(x: int) -> int {
19     let mut y: t = x + 2;
20     putstr(~"hello");
21     while y < 10 { putint(y); if y * 3 == 4 { y = y + 2; nothing(); } }
22     let mut z: t;
23     z = 0x55;
24     foo(z);
25     return 0;
26 }
27
28 fn main() {
29     let x: int = 2 + 2;
30     log(debug, x);
31     debug!("hello, world");
32     log(debug, 10);
33 }