Stabilisation Report
Summary
This PR will stabilise inline_const feature in expression position. inline_const_pat is still unstable and will not be stabilised.
The feature will allow code like this...
Because const FOO: () is an item, thus it is only lexically scoped (i.e. visible) inside require_zst, but does not inherit its generics (thus it cannot use T).
The code they were looking at was used for writing the table, but they were testing the one that read it (which is instead correct).
Yeah that’s me :)The translation using an associated const also works when the
const
block uses generic parameters. For example:This can be written as:
However it cannot be written as:
Because
const FOO: ()
is an item, thus it is only lexically scoped (i.e. visible) insiderequire_zst
, but does not inherit its generics (thus it cannot useT
).