rust/src/test/run-pass/log-linearized.rs
2012-10-12 20:43:38 -07:00

24 lines
346 B
Rust

// Tests that shapes respect linearize_ty_params().
enum option<T> {
none,
some(T),
}
type smallintmap<T> = @{mut v: ~[mut option<T>]};
fn mk<T>() -> smallintmap<T> {
let v: ~[mut option<T>] = ~[mut];
return @{mut v: move v};
}
fn f<T,U>() {
let sim = mk::<U>();
log(error, sim);
}
fn main() {
f::<int,int>();
}