Conversation
|
|
|
wait no I haven't had my coffee yet what am I doing, this isn't the right fix, one moment... (I mean, it worked, but, yeah, actual fix pushed now) |
cabcba9 to
d32dd9e
Compare
| if tcx.features().generic_const_args() | ||
| || matches!(def_kind, DefKind::Const | DefKind::AssocConst) | ||
| && tcx.is_direct_const(def_id) | ||
| if matches!(def_kind, DefKind::Const | DefKind::AssocConst) |
There was a problem hiding this comment.
haha when I was reviewing that PR I thought about how I hate precedence on these things and can never tell where the parens go 😆
|
what does the THIR look like for this test, where does a NamedConst come from with a defid of an anon 🤔 |
comes from here for reference this is what the code looks like: enum T<const N: u8 = { T::<0>::B as u8 }> {
A = 2,
B,
}the anon const for the default in
|
I'm really dumb, missed something obvious, and wasn't any test in the test suite to catch it.
Fixes #162923
Introduced in #162760
r? @BoxyUwU or @matthiaskrgr if you'd like