forked from chronotope/chrono
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecated warnings in cargo output for rustc-serialize feature
Unfortunately due to rust-lang/rust#39935 placing the annotation on the `impl`s of `Encodable`/`Decodable` for the various items have no effect whatsoever, so we need to place it on some type that chrono actually uses internally. The only *type* that I can find that only exists for rustc-serialize only is the `TsSeconds` struct. So, marking TsSeconds deprecated causes Chrono's internal uses of `TsSeconds` to emit deprecation warnings, both in our builds and for packages that specify Chrono as a dependency with the `rustc-serialize` feature active. This means that the current commit will cause a `warning: use of deprecated item: RustcSerialize will be removed before chrono 1.0, use Serde instead` to appear in `cargo build` output. Unfortunately I don't think that it's possible for downstream crates to disable the warning the warning in any way other than actually switching to Serde or using an older chrono. That's the reason for all the `#[allow(deprecated)]` through the code, it means that the warning appears almost exactly once, instead of dozens of times.
- Loading branch information
1 parent
91d5dd4
commit 6c28949
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters