Fixed build for latest nightly (again)

This commit is contained in:
Alexander Regueiro
2018-05-03 23:28:02 +01:00
parent c7ce6c07b1
commit 00b549ad40
9 changed files with 42 additions and 49 deletions

View File

@@ -743,7 +743,7 @@ fn parse_attrs<F: FnMut(u64)>(sess: &Session, attrs: &[ast::Attribute], name: &'
continue;
}
if let Some(ref value) = attr.value_str() {
if attr.name().map_or(false, |n| n == name) {
if attr.name() == name {
if let Ok(value) = FromStr::from_str(&value.as_str()) {
attr::mark_used(attr);
f(value)