2015-02-03 06:03:39 +00:00
|
|
|
// compile-flags:-F private_no_mangle_fns -F no_mangle_const_items -F private_no_mangle_statics
|
2015-01-29 07:21:56 +00:00
|
|
|
|
|
|
|
#[no_mangle]
|
2018-09-21 22:58:11 +00:00
|
|
|
fn foo() {
|
2015-01-29 07:21:56 +00:00
|
|
|
}
|
|
|
|
|
2015-02-03 03:33:50 +00:00
|
|
|
#[allow(dead_code)]
|
|
|
|
#[no_mangle]
|
2019-07-18 22:05:23 +00:00
|
|
|
const FOO: u64 = 1; //~ ERROR const items should never be `#[no_mangle]`
|
2015-02-03 03:33:50 +00:00
|
|
|
|
|
|
|
#[no_mangle]
|
2019-07-18 22:05:23 +00:00
|
|
|
pub const PUB_FOO: u64 = 1; //~ ERROR const items should never be `#[no_mangle]`
|
2015-02-03 03:33:50 +00:00
|
|
|
|
2015-01-29 07:21:56 +00:00
|
|
|
#[no_mangle]
|
|
|
|
pub fn bar() {
|
|
|
|
}
|
|
|
|
|
2015-02-03 06:03:39 +00:00
|
|
|
#[no_mangle]
|
|
|
|
pub static BAR: u64 = 1;
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
#[no_mangle]
|
2018-09-21 22:58:11 +00:00
|
|
|
static PRIVATE_BAR: u64 = 1;
|
2015-02-03 06:03:39 +00:00
|
|
|
|
|
|
|
|
2015-01-29 07:21:56 +00:00
|
|
|
fn main() {
|
|
|
|
foo();
|
|
|
|
bar();
|
|
|
|
}
|