Include unknown attribute name in error message

This commit is contained in:
David Tolnay
2016-09-27 00:02:15 -07:00
parent 8ee8c07090
commit 4ad6c4fd56
3 changed files with 8 additions and 8 deletions
+6 -6
View File
@@ -142,8 +142,8 @@ impl Item {
}
_ => {
// TODO include name of attr
cx.error("unknown serde container attribute");
cx.error(format!("unknown serde container attribute `{}`",
meta_item.name()));
}
}
}
@@ -208,8 +208,8 @@ impl Variant {
}
_ => {
// TODO include attribute
cx.error("unknown serde variant attribute");
cx.error(format!("unknown serde variant attribute `{}`",
meta_item.name()));
}
}
}
@@ -353,8 +353,8 @@ impl Field {
}
_ => {
// TODO include attribute
cx.error("unknown serde field attribute");
cx.error(format!("unknown serde field attribute `{}`",
meta_item.name()));
}
}
}