-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Dedup Fluent invalid ptr errors in const eval #116777
Dedup Fluent invalid ptr errors in const eval #116777
Conversation
I believe these forms aren't unbearable to work with, and Fluent's ability to use selectors allows us to avoid enumerating every case laboriously.
This is an extremely conservative refactor to achieve the goal, admittedly, so perhaps @RalfJung would want further changes along these lines. In any case, this is the kind of thing that is permissible in Fluent, so we don't have to buckle under having a thousand little messages for the same thing, and this way the translator can retain the full context. |
Apparently this kind of form is the kind of thing Project Fluent prefers? |
There are 7 more messages that duplicate the box/ref cases:
This affects all |
It could use a selector, but it's not clear defaulting between "box" and "reference" yields a correct result, and selectors require defaults. |
Also we'd have to repeat the selector 7 times, no? That's still O(n*m) for what should be O(n+m)
|
Then we'd need to create an identifier for "reference", and another for "box", and then we pass that as a parameter to these messages |
@rustbot author |
☔ The latest upstream changes (presumably #119621) made this pull request unmergeable. Please resolve the merge conflicts. |
@workingjubilee any updates on this? Thanks |
@workingjubilee @rustbot label: +S-inactive |
I believe these forms aren't unbearable to work with, and Fluent's ability to use selectors allows us to avoid enumerating every case laboriously.
Closes #116764 if accepted.
r? @fee1-dead