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
+1 -1
View File
@@ -24,6 +24,6 @@ with-syn = []
clippy = { version = "^0.*", optional = true }
quote = "0.1"
serde_codegen_internals = { version = "=0.8.9", default-features = false, path = "../serde_codegen_internals" }
syn = { version = "0.7", features = ["aster", "visit"] }
syn = { version = "0.7.1", features = ["aster", "visit"] }
syntex = { version = "^0.44.0", optional = true }
syntex_syntax = { version = "^0.44.0", optional = true }
+1 -1
View File
@@ -15,4 +15,4 @@ unstable-testing = ["clippy"]
[dependencies]
clippy = { version = "^0.*", optional = true }
syn = "0.7"
syn = "0.7.1"
+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()));
}
}
}