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