Stream: wg-traits

Topic: coherence for function bodies


matklad (Sep 16 2019 at 07:58, on Zulip):

@nikomatsakis: @vlad and I were discussing the problem of "impls inside functions leak outside". Do you think it makes sense to submit some RFC on the topic, just to start things moving? I think the delta which we want to apply (modulo backwards compat) is:

It seems like we don't have capacity to work on this right now, but perhaps it makes sense to submit an RFC just to keep the problem documented?

Florian Diebold (Sep 16 2019 at 08:44, on Zulip):

It would be enough though to deprecate / lint against this with a message saying "don't do this, or it won't work with IDEs", right?

matklad (Sep 16 2019 at 08:45, on Zulip):

Right, and #[allow(leaking_impls)] on the function would cause IDE to look inside

matklad (Sep 16 2019 at 08:46, on Zulip):

Like, the act of silencing the lint makes it non-problematic, which is a fun property :)

Florian Diebold (Sep 16 2019 at 08:50, on Zulip):

unless you silence it in the whole crate ;)

nikomatsakis (Sep 20 2019 at 20:27, on Zulip):

I have been thinking about this a bit as well. I don't think I'd submit an RFC -- but it'd be nice to have some place to track it as a "future idea".

matklad (Sep 20 2019 at 20:31, on Zulip):

What that place would be?

nikomatsakis (Sep 20 2019 at 20:35, on Zulip):

There is no good place right now I don't think

nikomatsakis (Sep 20 2019 at 20:35, on Zulip):

But I dont' like using open RFCs for it, I know tha t:)

nikomatsakis (Sep 20 2019 at 20:35, on Zulip):

I guess in theory issues on rust-lang/rfcs is the official place

nikomatsakis (Sep 20 2019 at 20:36, on Zulip):

(I have wanted however to create something i the lang-team repository)

nikomatsakis (Sep 20 2019 at 20:36, on Zulip):

but I didn't yet :)

matklad (Sep 20 2019 at 20:37, on Zulip):

FWIW, I feel like my and Vlad 's heads provide enough redundancy here, so no additional storage is required. Logistically, it maybe makes sense to thing about this once chalk is fully in production?

Last update: Nov 18 2019 at 00:50UTC