Stream: wg-traits

Topic: assoc types in inherent impls


gnzlbg (Apr 17 2019 at 14:33, on Zulip):

Is there a timeline on supporting:

struct A;
struct B;
impl A { type C = B; }

?

eddyb (Apr 17 2019 at 14:34, on Zulip):

that's lazy normalization

eddyb (Apr 17 2019 at 14:34, on Zulip):

yes, the same thing as [u8; size_of::<T>()]

gnzlbg (Apr 17 2019 at 14:34, on Zulip):

even for that case without generics ?

eddyb (Apr 17 2019 at 14:35, on Zulip):

hmm

eddyb (Apr 17 2019 at 14:35, on Zulip):

we could add eagerly normalizing <T>::X types

eddyb (Apr 17 2019 at 14:35, on Zulip):

so maybe sooner than lazy normalization

eddyb (Apr 17 2019 at 14:36, on Zulip):

cc @nikomatsakis

eddyb (Apr 17 2019 at 14:36, on Zulip):

@gnzlbg but if we do this we would have two systems for the T::X syntax

gnzlbg (Apr 17 2019 at 14:36, on Zulip):

i mean, the issue has been open for like 6-7 years, and the last update is that it is blocked on chalk, but I really don't see what problem would chalk need to solve there

eddyb (Apr 17 2019 at 14:36, on Zulip):

hehe

gnzlbg (Apr 17 2019 at 14:36, on Zulip):

the RFC was accepted like 7 years ago

gnzlbg (Apr 17 2019 at 14:37, on Zulip):

so that is just awaiting implementation

eddyb (Apr 17 2019 at 14:37, on Zulip):

blocked on chalk is code for lazy normalization

eddyb (Apr 17 2019 at 14:37, on Zulip):

sometimes

gnzlbg (Apr 17 2019 at 14:38, on Zulip):

I can imagine that this is true when generics are involved

eddyb (Apr 17 2019 at 14:38, on Zulip):

we can try to do something sooner, there's just a risk it'd be backwards incompat with the real thing

gnzlbg (Apr 17 2019 at 14:38, on Zulip):

how far is lazy normalization ?

oli (Apr 17 2019 at 14:41, on Zulip):

There's new movement on it since today: https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/lazy.20normalization

centril (Apr 17 2019 at 14:44, on Zulip):

there's just a risk it'd be backwards incompat with the real thing

@eddyb hmm, why?

centril (Apr 17 2019 at 14:44, on Zulip):

and if so, let's please not rush this and do it properly

centril (Apr 17 2019 at 14:45, on Zulip):

I would really like to avoid the same fuckup that type aliases have

eddyb (Apr 17 2019 at 16:18, on Zulip):

@centril things like fallback (inherent -> bounds -> trait impls, etc.)

centril (Apr 17 2019 at 16:19, on Zulip):

ah

Last update: Nov 12 2019 at 16:45UTC