graydon/rust — Issue #1461: "warning: Captured variable 'x' not used in closure" presages a crash
Author: jruderman
Created: 2012-01-08 06:59:36+00:00
State: open
Labels: segv

fn main() {
let x = ~1;
let lam_move = lambda[move x]() { };
lam_move();
}

While compiling:

3:32 warning: Captured variable 'x' not used in closure

While running:

malloc: *** error for object 0x1: pointer being freed was not allocated