Skip to content

Instantly share code, notes, and snippets.

@AyeGill
Last active December 17, 2015 10:28
Show Gist options
  • Select an option

  • Save AyeGill/5594548 to your computer and use it in GitHub Desktop.

Select an option

Save AyeGill/5594548 to your computer and use it in GitHub Desktop.
This code failed to cause an ICE.
struct V<T>(int);
impl<T> V<T> {
fn new() -> V<T> {
V(12)
}
fn foo(self, val : T) {
let mut i = 0;
while i < *self {
println(fmt!("%?", val));
i += 1;
}
}
}
fn main() {
let f : V<&str> = V::new();
f.foo("foo");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment