rust/src/test/compile-fail/for-loop-decl.rs
Marijn Haverbeke 3b5b93221e Remove some semicolons after block calls
The remaining ones can be removed after the next snapshot. (Or
we can let the next pretty-print pass take care of them.)
2011-10-21 14:24:42 +02:00

20 lines
444 B
Rust

// error-pattern: mismatched types
use std;
import std::map::hashmap;
import std::bitv;
type fn_info = {vars: hashmap<uint, var_info>};
type var_info = {a: uint, b: uint};
fn bitv_to_str(enclosing: fn_info, v: bitv::t) -> str {
let s = "";
// error is that the value type in the hash map is var_info, not a box
enclosing.vars.values {|val|
if bitv::get(v, val) { s += "foo"; }
}
ret s;
}
fn main() { log "OK"; }