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
Hi, I'm very new to rust and I'm trying to learn more about this language.
I would like to make the change. Seems that I have to change the error text (e.g. ..., but the item of the parent impl is not marked default), Is it right?
However searching about specialization documents I found this issue rust/issues/31844 where seems that a default implwill be possible.
Am i missing something?
The text should suggest that the item could be default, but not that the parent impl could be, because it can't. It might be in the future (as suggested by #31844) but that is not certain.
Hi @nrc ,
I'm seeing a bit more deep the specialization feature. I'm wondering if I can try to implement the default impl.
I have in mind to do what is described in the following quotes taken from the RFC
we could easily add a shorthand later on in which default impl Trait for Type is sugar for adding default to all items in the impl.
For the moment, with this implementation, the default impl must define all items of the trait (not a part of them) and, therefore, they will be all treated as default items.
Would you accept a PR for this?
@giannicic there is some debate at the moment about some of the details of specialisation. It would probably be best to open a thread on internals.rust-lang.org before starting to work on this.
Activity
giannicic commentedon Sep 20, 2016
Hi, I'm very new to rust and I'm trying to learn more about this language.
I would like to make the change. Seems that I have to change the error text (e.g. ..., but the item of the parent impl is not marked
default
), Is it right?However searching about specialization documents I found this issue rust/issues/31844 where seems that a
default impl
will be possible.Am i missing something?
nrc commentedon Sep 20, 2016
The text should suggest that the item could be
default
, but not that the parent impl could be, because it can't. It might be in the future (as suggested by #31844) but that is not certain.rust-lang#36553 specialisation error 502 is misleading
rust-lang#36553 specialisation error 520 is misleading
giannicic commentedon Sep 30, 2016
Hi @nrc ,
I'm seeing a bit more deep the specialization feature. I'm wondering if I can try to implement the
default impl
.I have in mind to do what is described in the following quotes taken from the RFC
For the moment, with this implementation, the
default impl
must define all items of the trait (not a part of them) and, therefore, they will be all treated as default items.Would you accept a PR for this?
nrc commentedon Oct 2, 2016
@giannicic there is some debate at the moment about some of the details of specialisation. It would probably be best to open a thread on internals.rust-lang.org before starting to work on this.
kyrias commentedon Oct 18, 2016
PR #36652 was merged, so this can be closed now.