Stream: t-lang

Topic: disarming specialization


nikomatsakis (Feb 05 2020 at 21:43, on Zulip):

@Matthew Jasper what sorts of checks are you working on?

nikomatsakis (Feb 05 2020 at 21:43, on Zulip):

maybe let's move that to another zulip topic, actually

Matthew Jasper (Feb 05 2020 at 21:48, on Zulip):

The goal was to ensure that all specialising impls are always applicable. There were some compromises so that all the impls in libstd (except those removed in the linked PR) are allowed.

Matthew Jasper (Feb 05 2020 at 21:53, on Zulip):

To allow the required impls, I had to consider the bounds from the specialized impl. I also had to whitelist some marker traits (via attribute) as being ok to specialize on (this is unsound for traits other than Sized, but can't be exploited in the same way as traits with items).

Matthew Jasper (Feb 05 2020 at 21:56, on Zulip):

I'm unsure if we can keep all of the TrustedRandomAccess impls that we currently have.

nikomatsakis (Feb 06 2020 at 00:08, on Zulip):

To allow the required impls, I had to consider the bounds from the specialized impl. I also had to whitelist some marker traits (via attribute) as being ok to specialize on (this is unsound for traits other than Sized, but can't be exploited in the same way as traits with items).

this is kind of the "more advanced" variant of "always applicable" that I initially proposed?

Matthew Jasper (Feb 08 2020 at 22:02, on Zulip):

#68970

Last update: Jun 07 2020 at 10:40UTC