Rollup merge of #60823 - oli-obk:used_unused_no_mangle, r=michaelwoerister
Fix incremental compilation of cdylib emitting spurious unused_attributes lint fixes #60050
This commit is contained in:
commit
36b5724e0d
|
@ -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),
|
||||
(
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -52,7 +52,7 @@
|
|||
//~^ WARN unused attribute
|
||||
#![path = "3800"] //~ WARN unused attribute
|
||||
#![automatically_derived] //~ WARN unused attribute
|
||||
#![no_mangle] //~ WARN unused attribute
|
||||
#![no_mangle]
|
||||
#![no_link] //~ WARN unused attribute
|
||||
// see issue-43106-gating-of-derive.rs
|
||||
#![should_panic] //~ WARN unused attribute
|
||||
|
|
|
@ -1152,12 +1152,6 @@ warning: unused attribute
|
|||
LL | #![automatically_derived]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
warning: unused attribute
|
||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:55:1
|
||||
|
|
||||
LL | #![no_mangle]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
warning: unused attribute
|
||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:56:1
|
||||
|
|
||||
|
|
Loading…
Reference in New Issue