-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use serde's error message option to avoid implementing Deserialize
.
#9237
Conversation
r? @Eh2406 (rust-highfive has picked a reviewer for you, use r? to override) |
206858e
to
a922134
Compare
☔ The latest upstream changes (presumably #9204) made this pull request unmergeable. Please resolve the merge conflicts. |
Thanks for the PR and sorry for the delay in review! This looks great to me and I think this is fine to land, want to rebase this and I'll r+? |
a922134
to
54742ce
Compare
Thanks! @bors r+ |
📌 Commit 54742ce has been approved by |
☀️ Test successful - checks-actions |
Update cargo 8 commits in 90691f2bfe9a50291a98983b1ed2feab51d5ca55..58a961314437258065e23cb6316dfc121d96fb71 2021-03-16 21:36:55 +0000 to 2021-03-22 22:59:56 +0000 - Emit note when `--future-incompat-report` had nothing to report (rust-lang/cargo#9263) - RFC 3052: Stop including authors field in manifests made by cargo new (rust-lang/cargo#9282) - Refactor feature handling, and improve error messages. (rust-lang/cargo#9290) - Split out cargo-util package for cargo-test-support. (rust-lang/cargo#9292) - Fix redundant_semicolons warning in resolver-tests. (rust-lang/cargo#9293) - Use serde's error message option to avoid implementing `Deserialize`. (rust-lang/cargo#9237) - Allow `cargo update` to operate with the --offline flag (rust-lang/cargo#9279) - Fix typo in faq.md (rust-lang/cargo#9285)
Update cargo 8 commits in 90691f2bfe9a50291a98983b1ed2feab51d5ca55..58a961314437258065e23cb6316dfc121d96fb71 2021-03-16 21:36:55 +0000 to 2021-03-22 22:59:56 +0000 - Emit note when `--future-incompat-report` had nothing to report (rust-lang/cargo#9263) - RFC 3052: Stop including authors field in manifests made by cargo new (rust-lang/cargo#9282) - Refactor feature handling, and improve error messages. (rust-lang/cargo#9290) - Split out cargo-util package for cargo-test-support. (rust-lang/cargo#9292) - Fix redundant_semicolons warning in resolver-tests. (rust-lang/cargo#9293) - Use serde's error message option to avoid implementing `Deserialize`. (rust-lang/cargo#9237) - Allow `cargo update` to operate with the --offline flag (rust-lang/cargo#9279) - Fix typo in faq.md (rust-lang/cargo#9285)
Update cargo 12 commits in 90691f2bfe9a50291a98983b1ed2feab51d5ca55..1e8703890f285befb5e32627ad4e0a0454dde1fb 2021-03-16 21:36:55 +0000 to 2021-03-26 16:59:39 +0000 - tests: Tolerate "exit status" in error messages (rust-lang/cargo#9307) - Default macOS targets to `unpacked` debuginfo (rust-lang/cargo#9298) - Fix publication of packages with metadata and resolver (rust-lang/cargo#9300) - Fix config includes not working. (rust-lang/cargo#9299) - Emit note when `--future-incompat-report` had nothing to report (rust-lang/cargo#9263) - RFC 3052: Stop including authors field in manifests made by cargo new (rust-lang/cargo#9282) - Refactor feature handling, and improve error messages. (rust-lang/cargo#9290) - Split out cargo-util package for cargo-test-support. (rust-lang/cargo#9292) - Fix redundant_semicolons warning in resolver-tests. (rust-lang/cargo#9293) - Use serde's error message option to avoid implementing `Deserialize`. (rust-lang/cargo#9237) - Allow `cargo update` to operate with the --offline flag (rust-lang/cargo#9279) - Fix typo in faq.md (rust-lang/cargo#9285)
This is a cleanup based on serde-rs/serde#1883, which fell out of #8664
It looks like this changes the resulting error messages. I'll leave it up to you to decide if the tradeoff makes sense here. Maybe the correct answer here is to make
serde
's error messages include more details (e.g.invalid type: int
).