You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
regression: error[E0119]: conflicting implementations of trait AsStr for type String #134708
[INFO] [stdout] error[E0119]: conflicting implementations of trait `AsStr` for type `String`
[INFO] [stdout] --> examples/basic.rs:3:1
[INFO] [stdout] |
[INFO] [stdout] 3 | #[delegate]
[INFO] [stdout] | ^^^^^^^^^^^ conflicting implementation for `String`
[INFO] [stdout] ...
[INFO] [stdout] 8 | impl AsStr for String {
[INFO] [stdout] | --------------------- first implementation here
[INFO] [stdout] |
[INFO] [stdout] = note: upstream crates may add a new impl of trait `temporary_enum_delegate_0_3_0::__macros::Convert` for type `std::string::String` in future versions
[INFO] [stdout] = note: upstream crates may add a new impl of trait `temporary_enum_delegate_0_3_0::__macros::Bound<259758991428806249286467916654556560740, 268186603860731246084428674422145461480, 3, 1>` for type `std::string::String` in future versions
[INFO] [stdout] = note: this error originates in the attribute macro `delegate` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] For more information about this error, try `rustc --explain E0119`.
[INFO] [stdout]
[INFO] [stderr] error: could not compile `temporary_enum_delegate_0_3_0` (example "basic") due to 1 previous error
std::string::String: upstream::Convert fails the is_knowable check and should do so. This means that all these trait bounds have an unknown type as the self-type and have to be ambiguous. After-all, upstream could implement String: Convert with arbitrary associated types.
changed the title [-]regression: conflicting implementations of trait `AsStr` for type `String`[/-][+]regression: error[E0119]: conflicting implementations of trait `AsStr` for type `String`[/+]on Dec 24, 2024
Activity
compiler-errors commentedon Dec 23, 2024
@lcnr: do you remember if this is known breakage from #130654? This seems coherence related 🤔
lcnr commentedon Dec 23, 2024
looking at the expansion, this feels like it's #114061
std::string::String: upstream::Convertfails theis_knowablecheck and should do so. This means that all these trait bounds have an unknown type as the self-type and have to be ambiguous. After-all, upstream could implementString: Convertwith arbitrary associated types.[-]regression: conflicting implementations of trait `AsStr` for type `String`[/-][+]regression: error[E0119]: conflicting implementations of trait `AsStr` for type `String`[/+]Mark-Simulacrum commentedon Jan 3, 2025
Closing as a known and relnotes'd soundness fix.