Closed
Description
Given the following code:
pub enum LabelText {
Plain,
}
impl<T> From<T> for LabelText
where
T: Into<Cow<'static, str>>,
{
fn from(text: T) -> Self {
LabelText::Plain(text.into())
}
}
The current output is:
error[E0119]: conflicting implementations of trait `core::convert::From<error::LabelText>` for type `error::LabelText`
--> src/error.rs:40:1
|
40 | impl<T> From<T> for LabelText
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<T> core::convert::From<T> for T;
= note: downstream crates may implement trait `core::convert::Into<[type error]>` for type `error::LabelText`
I doubt it's supposed to be Into<[type error]>
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.