2018-08-30 12:18:55 +00:00
|
|
|
//@ run-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 20:13:15 +00:00
|
|
|
//@ pretty-expanded FIXME #23616
|
2018-08-31 13:02:01 +00:00
|
|
|
#![allow(non_snake_case)]
|
2016-08-13 09:41:43 +00:00
|
|
|
#![allow(unused_variables)]
|
2014-02-07 19:08:32 +00:00
|
|
|
|
2014-02-21 23:41:51 +00:00
|
|
|
struct T { f: extern "Rust" fn() }
|
|
|
|
struct S { f: extern "Rust" fn() }
|
2011-09-16 16:30:20 +00:00
|
|
|
|
2014-02-21 23:41:51 +00:00
|
|
|
fn fooS(t: S) {
|
|
|
|
}
|
2013-05-25 02:35:29 +00:00
|
|
|
|
2014-02-21 23:41:51 +00:00
|
|
|
fn fooT(t: T) {
|
2011-09-16 16:30:20 +00:00
|
|
|
}
|
|
|
|
|
2014-02-21 23:41:51 +00:00
|
|
|
fn bar() {
|
2011-09-16 16:30:20 +00:00
|
|
|
}
|
|
|
|
|
2013-02-02 03:43:17 +00:00
|
|
|
pub fn main() {
|
2014-02-21 23:41:51 +00:00
|
|
|
let x: extern "Rust" fn() = bar;
|
|
|
|
fooS(S {f: x});
|
|
|
|
fooS(S {f: bar});
|
|
|
|
|
|
|
|
let x: extern "Rust" fn() = bar;
|
|
|
|
fooT(T {f: x});
|
|
|
|
fooT(T {f: bar});
|
2012-07-23 19:53:18 +00:00
|
|
|
}
|