0.rs:
fn main()
let foo = [0u8, ..4];
bar(foo);
}
fn bar(obviously_wrong: int) {}
Fed to rustc 0.5, produces:
0.rs:15:12: 15:15 error: mismatched types: expected `int` but found `[u8]/4` (expected int but found vector)
0.rs:15 bar(foo);
^~~
error: aborting due to previous error
Of course, trying to use [u8]/4 as suggested is a syntax error now.
0.rs:
Fed to rustc 0.5, produces:
Of course, trying to use
[u8]/4as suggested is a syntax error now.