Stream: t-compiler/wg-rls-2.0

Topic: Inference for trait objects


std::Veetaha (Apr 25 2020 at 16:05, on Zulip):

@Florian Diebold I was thinking why not making &dyn Trait behave like &impl Trait at least for the short term. Of course, this is not how it works but I'm just wondering if we can close that gap this way until the proper support is implemented?

Florian Diebold (Apr 25 2020 at 16:06, on Zulip):

you mean the other way around?

Florian Diebold (Apr 25 2020 at 16:07, on Zulip):

I don't think it's worth doing, proper impl Trait support in Chalk isn't far off

std::Veetaha (Apr 25 2020 at 16:07, on Zulip):

Not sure what you mean by "other way around", impl Trait works fine, while dyn Trait doesn't...

std::Veetaha (Apr 25 2020 at 16:08, on Zulip):

This is especially palpable since we switched to dyn for salsa::Database

Florian Diebold (Apr 25 2020 at 16:09, on Zulip):

only argument position impl Trait works fine, return position impl Trait doesn't work at all currently

Florian Diebold (Apr 25 2020 at 16:09, on Zulip):

whereas dyn Trait mostly works fine, just is missing super trait support

Florian Diebold (Apr 25 2020 at 16:10, on Zulip):

which is something that could just be fixed in Chalk

std::Veetaha (Apr 25 2020 at 16:10, on Zulip):

Aha, so this is due to the supertaits...

Florian Diebold (Apr 25 2020 at 16:10, on Zulip):

(it's on my list...)

std::Veetaha (Apr 25 2020 at 16:11, on Zulip):

So, this is the chalk field of responsibility and we cannot put a gag in our code.

Florian Diebold (Apr 25 2020 at 16:27, on Zulip):

it would be harder to work around this in our code than in Chalk

Last update: Sep 30 2020 at 16:15UTC