diff options
| author | Andreas Martens <andreasm@fastmail.fm> | 2013-08-18 22:17:47 +0200 |
|---|---|---|
| committer | Andreas Martens <andreasm@fastmail.fm> | 2013-08-18 22:17:47 +0200 |
| commit | cc0c6fd43cd1b38aade4c9264d4c05342e9694f5 (patch) | |
| tree | b6985ee702875ed4615165c55a79adc57af76f3a /src/test/auxiliary/static-function-pointer-aux.rs | |
| parent | a1066130c07b864a1612c49b4b84dc34d5f113a1 (diff) | |
| download | rust-cc0c6fd43cd1b38aade4c9264d4c05342e9694f5.tar.gz rust-cc0c6fd43cd1b38aade4c9264d4c05342e9694f5.zip | |
Add assertions and cross crate tests
Diffstat (limited to 'src/test/auxiliary/static-function-pointer-aux.rs')
| -rw-r--r-- | src/test/auxiliary/static-function-pointer-aux.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/auxiliary/static-function-pointer-aux.rs b/src/test/auxiliary/static-function-pointer-aux.rs new file mode 100644 index 00000000000..fcf82b13605 --- /dev/null +++ b/src/test/auxiliary/static-function-pointer-aux.rs @@ -0,0 +1,14 @@ +// 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. + +fn f(x: int) -> int { -x } + +pub static F: extern fn(int) -> int = f; +pub static mut MutF: extern fn(int) -> int = f; |
