-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: support associated_const_equality
in parser
#12013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
associated_const_equality
in parserassociated_const_equality
in parser
impl<T, const N: usize> Foo for T where T: HasCount<COUNT = {N}> {} | ||
|
||
impl<T> Foo for T where T: HasCount<COUNT = 0> {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests should be written as comments in the source code and then auto-generated by running cargo test -p syntax
. See the // test test_name
comments in the parser modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have written these tests as comments and changed them a bit.
It seems that cargo test -p syntax
doesn't automatically generate tests files, instead, I manually run sourcegen_parser_tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah my bad, its cargo test -p parser
, sourcegen_parser_tests
is the relevant one as you've found ye
efe92b4
to
b36f884
Compare
b36f884
to
6580d75
Compare
Make the CI happy again :). Please take a look @Veykril |
Thanks! |
📌 Commit 6580d75 has been approved by |
☀️ Test successful - checks-actions |
This pr fixes #11965. The parser now allows eq constraints on associated constants.
I've added tests for
HasCount<Count = {N}>
andHasCount<Count = 0>