Filter only for RustDeprecated in attrs

Previously any string-related attribute would emit a deprecation
warning!

cc #925
This commit is contained in:
Alex Crichton 2018-10-03 15:44:58 -07:00
parent 84bda02bbf
commit 9eaba6e28b

View File

@ -679,6 +679,7 @@ pub fn get_rust_deprecated<'a>(ext_attrs: &Option<ExtendedAttributeList<'a>>)
_ => None,
}
})
.filter(|attr| attr.lhs_identifier.0 == "RustDeprecated")
.filter_map(|ident| {
match ident.rhs {
IdentifierOrString::String(s) => Some(s),