Stream: wg-traits

Topic: Issue #60619

yodal (May 28 2019 at 14:59, on Zulip):

Hello folks,

The issue in question (rust-lang/rust#60619) relates to const generics, but due to the area the problem touches I think asking around here makes sense.

The last comment on that issue lays out as clearly as I can what is going on, but as a quick summary: const eval of array lengths is failing during wf checking if the length is an equation with a const param in it.

yodal (May 28 2019 at 15:04, on Zulip):

That const eval fails is expected as monomorphization has not happened (and in the case of the test case it never will), but this does mean that an obligation that the length is evaluatable is never satisfied. It is my understanding that wf checks should not care if we can evaluate the length, only that any parameters are from the right scope. Is this correct?

yodal (May 28 2019 at 15:06, on Zulip):

Lastly, whether or not that is the case, does anyone see a good way to more forward on this? I suggested that maybe const evaluation needs to note what parameters are too generic so that wf checking can makes sure they are in scope, but I'm not sure if that would be the right way forward. Thoughts?

Last update: Jan 21 2020 at 11:20UTC