Fix incremental compilation of cdylib emitting spurious unused_attributes lint

This commit is contained in:
Oliver Scherer 2019-05-14 14:19:46 +02:00
parent 80e7cde223
commit 2adc6da7aa
2 changed files with 11 additions and 1 deletions

View File

@ -998,7 +998,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
(sym::repr, Normal, template!(List: "C, packed, ..."), Ungated),
(sym::path, Normal, template!(NameValueStr: "file"), Ungated),
(sym::automatically_derived, Normal, template!(Word), Ungated),
(sym::no_mangle, Normal, template!(Word), Ungated),
(sym::no_mangle, Whitelisted, template!(Word), Ungated),
(sym::no_link, Normal, template!(Word), Ungated),
(sym::derive, Normal, template!(List: "Trait1, Trait2, ..."), Ungated),
(

View File

@ -0,0 +1,10 @@
// revisions:rpass1 rpass2
// compile-flags: --crate-type cdylib
// skip-codegen
#![deny(unused_attributes)]
#[no_mangle]
pub extern "C" fn rust_no_mangle() -> i32 {
42
}