Skip to content

fix: Workaround E0119 trait conflict introduced by time v0.3.48#438

Closed
ReenigneCA wants to merge 1 commit into
rustls:mainfrom
ReenigneCA:main
Closed

fix: Workaround E0119 trait conflict introduced by time v0.3.48#438
ReenigneCA wants to merge 1 commit into
rustls:mainfrom
ReenigneCA:main

Conversation

@ReenigneCA

Copy link
Copy Markdown

Constrains the time dependency in Cargo.toml to fix a broken build caused by the recent time v0.3.48 release.

time 0.3.48 introduces an upstream trait implementation that conflicts with rcgen's generic impl<T: Into<String>> From<T> bounds for OtherNameValue and DnValue. Without this constraint, running cargo update && cargo build fails with an E0119: conflicting implementations error.

Updating Cargo.toml to reject time 0.3.48 fixes cargo update for rcgen and downstream users until the incompatibility can be resolved.

rustc error context
error[E0119]: conflicting implementations of trait `From<format_description::parse::format_item::HourBase>` for type `<format_description::parse::format_item::HourBase as format_description::parse::format_item::ModifierValue>::Type`
   --> rcgen/src/lib.rs:359:1
    |
359 | / impl<T> From<T> for OtherNameValue
360 | | where
361 | |     T: Into<String>,
    | |____________________^
    |
    = note: conflicting implementation in crate `time`:
            - impl From<format_description::parse::format_item::HourBase> for <format_description::parse::format_item::HourBase as format_description::parse::format_item::ModifierValue>::Type;
    = note: upstream crates may add a new impl of trait `std::convert::Into<std::string::String>` for type `time::format_description::parse::format_item::HourBase` in future versions

error[E0119]: conflicting implementations of trait `From<format_description::parse::format_item::HourBase>` for type `<format_description::parse::format_item::HourBase as format_description::parse::format_item::ModifierValue>::Type`
   --> rcgen/src/lib.rs:452:1
    |
452 | / impl<T> From<T> for DnValue
453 | | where
454 | |     T: Into<String>,
    | |____________________^
    |
    = note: conflicting implementation in crate `time`:
            - impl From<format_description::parse::format_item::HourBase> for <format_description::parse::format_item::HourBase as format_description::parse::format_item::ModifierValue>::Type;
    = note: upstream crates may add a new impl of trait `std::convert::Into<std::string::String>` for type `time::format_description::parse::format_item::HourBase` in future versions

For more information about this error, try `rustc --explain E0119`.
error: could not compile `rcgen` (lib) due to 2 previous errors

time 0.3.48 creates trait conflicts. This allows cargo update to work properly until the difference with rcgen is worked out fully.
@ctz

ctz commented Jun 12, 2026

Copy link
Copy Markdown
Member

This would be worse than the current state, where users can simply pin a non-broken (either the previous, or subsequent, versions).

@djc djc closed this Jun 12, 2026
@djc

djc commented Jun 12, 2026

Copy link
Copy Markdown
Member

This should happen in your lockfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants