rust-lang / rust-lang/rust-bindgen
PartialOrd for opaque?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
In #882 (PR #1002) we used PartialEq analysis to analyse whether we can derive PartialOrd. Generally this makes sense because if PartialEq can be derived then PartialOrd can be derived too.
But there is a problem. I can imagine what means for opaque types to be PartialEq: we just have to compare byte-by-byte both blobs. But I have a problem imaging what we should do in case of PartialOrd: compare each byte in both blobs?
Maybe we should split result of the analysis and explicitly state whether we can derive PartialOrd or not?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the PartialEq analysis discussed in #882 and implemented in PR #1002, focusing on how it is used to assess PartialOrd derivation for opaque types. Determine and document the intended ordering semantics and whether the analysis must distinguish PartialEq from PartialOrd. Done means the project has an agreed direction for handling opaque PartialOrd support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100