-
Notifications
You must be signed in to change notification settings - Fork 60
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
Is Ord strictly required for Lang Kind? #131
Comments
The thinking here is that The Though, I'd say TL;DR: no real reason, but I think there are marginal ergonomics wins here, so it doesn't hurt. |
Ah, that makes some amount of sense. Something bugs me semantically about the actually implying that the natural ordering is meaningful (in my project at least, I don't think it actually is). If y'all are amenable to loosening those requirements I'm happy to fire off a PR, but I kinda got the impression from that response of "I'd rather keep them", so I can also just live with an ordering defined on my SyntaxKind & just ignore it or something I suppose and close this. Not a huge deal to me either way :-) |
My gut feeling is that I’d rather keep, yeah. But. Can you maybe try to do this change and check if rust-analyzer needs any changes? If that’s not the case and it just works, than let’s remove the bound. ra has some setup for substituting rowan already: |
Hi!
I've been poking around at using rowan for a project, and I was wondering what the logic for Lang & Kind being
Ord
was. It's not a massive burden (like...#[derive(PartialOrd, Ord)]
is pretty easy :-P) but it feels a bit strange for me to make mySyntaxKind
Ord
when it's shouldn't really be compared like that (like, what doesIdentifier > Operator
mean). Triedcargo build --examples
andcargo test
w/o it and nothing seemed to fail to compile (also triedcargo build
on rust-analyzer itself with the dep pointed to the local copy, and it seemed to build fine), so that got me curious as to what the original logic was.The text was updated successfully, but these errors were encountered: