summary refs log tree commit diff
path: root/src/test/run-pass/cap-clause-not-used.rs
blob: 742214ee2a19fb3ef8785c8a1c318d8fd594f8a4 (plain)
1
2
3
4
5
// error-pattern: warning: Captured variable 'y' not used in closure
fn main() {
    let x = 5;
    let _y = fn~[copy x]() { };
}