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
As seen previously in #9767, messaging when attempting to impl a trait involving a type alias could be improved (using current nightly):
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> manifest/mod.rs:169:1
|
169 | impl<'a> FromIterator<io::Result<String>> for Result<Manifest<'a>> {
| _^ starting here...
170 | | fn from_iter<I: IntoIterator<Item = io::Result<String>>>(iter: I) -> Result<Self> {
171 | | let mut m = Manifest::new();
172 | | Ok(m)
173 | | }
174 | | }
| |_^ ...ending here: impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
I had expected to see = note: define and implement a trait or new type instead as described in #9767, but did not, so perhaps this is a regression or a subtly different case?
As someone relatively new to rust, it seems like I should be able to impl in this case since it is specialized such that it's only for a Result using my types, but I guess not.
The text was updated successfully, but these errors were encountered:
As seen previously in #9767, messaging when attempting to impl a trait involving a type alias could be improved (using current nightly):
From line 86 of that file:
I had expected to see
= note: define and implement a trait or new type instead
as described in #9767, but did not, so perhaps this is a regression or a subtly different case?As someone relatively new to rust, it seems like I should be able to
impl
in this case since it is specialized such that it's only for a Result using my types, but I guess not.The text was updated successfully, but these errors were encountered: