Stream: t-lang

Topic: const generics bug?


Ryan Levick (Dec 17 2019 at 11:19, on Zulip):

Hello! Is the following a bug or currently unimplemented part of const generics. https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=af6ebff0d4a480f851b149cb13ceb6fb
It seems that the method on a trait does not properly recognize that Self: Sized

nikomatsakis (Dec 17 2019 at 16:00, on Zulip):

bug in const generics

Josh Triplett (Dec 17 2019 at 16:31, on Zulip):

Known bug, or exciting new bug?

nikomatsakis (Dec 17 2019 at 19:31, on Zulip):

Known bug

nikomatsakis (Dec 17 2019 at 19:32, on Zulip):

tl;dr const generics aren't ready for use

nikomatsakis (Dec 17 2019 at 19:32, on Zulip):

don't extrapolate basically anything from their current behavior :)

Ryan Levick (Dec 17 2019 at 20:27, on Zulip):

@nikomatsakis should I file an issue?

Josh Triplett (Dec 17 2019 at 20:48, on Zulip):

@Ryan Levick You should, yes.

Josh Triplett (Dec 17 2019 at 20:48, on Zulip):

Thank you!

nikomatsakis (Dec 17 2019 at 21:27, on Zulip):

@Ryan Levick actually, I think no

nikomatsakis (Dec 17 2019 at 21:28, on Zulip):

I dont' know that a new example will change much; there is some (slow) action happening in #wg-traits > lazy-normalization and const generics topic around this though

centril (Dec 18 2019 at 04:54, on Zulip):

@Ryan Levick In the future, if you think something might be a bug, please file an issue.

Last update: Jan 28 2020 at 00:40UTC