2012-12-10 17:32:48 -08:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2011-09-07 17:01:24 -07:00
|
|
|
// error-pattern:fail
|
|
|
|
|
2013-08-17 08:37:42 -07:00
|
|
|
fn f(_a: @int) {
|
2013-02-11 19:26:38 -08:00
|
|
|
fail!();
|
2011-09-07 17:01:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2012-06-19 19:34:01 -07:00
|
|
|
let b = @0;
|
2013-03-01 15:55:31 -08:00
|
|
|
let g: @fn() = || f(b);
|
2011-09-07 17:01:24 -07:00
|
|
|
g();
|
2013-01-31 17:51:01 -08:00
|
|
|
}
|