E0043#
Warning name: unused_attribute
Unused attribute.
An attribute will not take effect due to reasons such as being duplicated while it should be unique, being applied to an entity that it has no effect, or being misused
Erroneous example#
///|
/// This is an invalid usage as the deprecation warning should be unique
#deprecated("")
#deprecated("The attribute is unused because it's duplicated")
pub fn f() -> Unit {
}
///|
/// This is an invalid usage as struct can't be external
#external
pub struct T {}
///|
/// This is an invalid usage as it expects a string
#deprecated(asdfasdf)
pub fn g() -> Unit {
}
Suggestion#
Apply the fix according to the specific warning message.
///|
#deprecated("")
pub fn f() -> Unit {
}
///|
pub struct T {}
///|
#deprecated("asdfasdf")
pub fn g() -> Unit {
}