Closed
Description
This successfully compiles, even though inner is a &Foo
.
use std::sync::TaskPool;
struct Foo {
p: TaskPool,
q: uint
}
impl Foo {
fn f(&self) {
let inner = self.clone();
self.p.execute(proc() {
println!("{}", inner.q);
});
}
}
fn main() {}
For a more real example, see sfackler/r2d2@d864a78. It'll cause tests to segfault ~50% of the time.