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