Sign in
fuchsia
/
third_party
/
github.com
/
rust-lang
/
rust
/
86e0ff47a0d1afcbe9f0c8cdb54f60bb18da20df
/
.
/
src
/
test
/
run-make-fulldeps
/
linkage-attr-on-static
/
bar.rs
blob: 68607cbb6572108b0e5013533ada08ebc0c4cd92 [
file
] [
log
] [
blame
]
#![
feature
(
linkage
)]
#[
no_mangle
]
#[
linkage
=
"external"
]
static
BAZ
:
i32
=
21
;
#[
link
(
name
=
"foo"
,
kind
=
"static"
)]
extern
"C"
{
fn
what
()
->
i32
;
}
fn
main
()
{
unsafe
{
assert_eq
!(
what
(),
BAZ
);
}
}