Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
17
tests/ui/statics/static-function-pointer-xc.rs
Normal file
17
tests/ui/statics/static-function-pointer-xc.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
// run-pass
|
||||
// aux-build:static-function-pointer-aux.rs
|
||||
|
||||
extern crate static_function_pointer_aux as aux;
|
||||
|
||||
fn f(x: isize) -> isize { x }
|
||||
|
||||
pub fn main() {
|
||||
assert_eq!(aux::F(42), -42);
|
||||
unsafe {
|
||||
assert_eq!(aux::MutF(42), -42);
|
||||
aux::MutF = f;
|
||||
assert_eq!(aux::MutF(42), 42);
|
||||
aux::MutF = aux::f;
|
||||
assert_eq!(aux::MutF(42), -42);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue