Open luser opened 6 years ago
Unfortunately doing the obvious thing here doesn't work:
error[E0119]: conflicting implementations of trait `EnvironmentItem` for type `(std::ffi::OsString, std::ffi::OsString)`:
--> src/lib.rs:248:1
|
236 | impl EnvironmentItem for (OsString, OsString) {
| --------------------------------------------- first implementation here
...
248 | impl<T: ToString, Z: ToString> EnvironmentItem for (T, Z) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(std::ffi::OsString, std::ffi::OsString)`
|
= note: upstream crates may add new impl of trait `std::fmt::Display` for type `std::ffi::OsString` in future versions
This is https://github.com/rust-lang/rust/issues/45542 apparently.
Currently
EnvironmentItem
has a blanket impl for(T, T)
whereT: ToString
. Unfortunately this doesn't cover(OsString, OsString)
, becauseOsString
doesn't implDisplay
! I ran into this trying to convert some tests I have in sccache to useassert_cli
.