about summary refs log tree commit diff
path: root/tests/ui/attributes/mixed_export_name_and_no_mangle.rs
blob: 79f1e5c19c544fff6f3902053bcc1a677f724254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// issue: rust-lang/rust#47446
//@ run-rustfix
//@ check-pass

#![warn(unused_attributes)]
#[no_mangle]
//~^ WARN `#[no_mangle]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
#[export_name = "foo"]
pub fn bar() {}

#[unsafe(no_mangle)]
//~^ WARN `#[no_mangle]` attribute may not be used in combination with `#[export_name]` [unused_attributes]
#[export_name = "baz"]
pub fn bak() {}

fn main() {}