Repository navigation
Conversation
Display, Debug, Eq, Hash, and Ord on an object become <object>_to_string, _to_debug_string, _eq/_ne, _hash, and _cmp, calling the C++ binding's method of the same name. Records and enums still refuse them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The C backend renders an object's exported traits instead of refusing them, so moq-ffi's
MoqInstance(an opaque instance that compares by value) reaches the generated C. Pinned by moq-dev/moq#8366.C
Display,Debug,Eq,Hash, andOrdon an object become<object>_to_string,<object>_to_debug_string,<object>_eq/<object>_ne,<object>_hash, and<object>_cmp, named like the C++ binding's methods and calling them through the existing callable renderer (null checks, owned string returns).<object>_eq.Displayon errors).Tests
c_apifixture:CapiTag, an object exporting all five traits. The C test checks each function, including that two handles to equal objects are distinct pointers but_eq, with matching hashes.Run locally: the full ctest suite (35 tests) on Linux with GCC 16,
cargo fmt --check, andcargo clippy(no warnings). moq'sjust c checkpasses against this build.Release
Tagged
v0.11.0-kixelated.8+v0.32.2at this branch's head, which moq-dev/moq#8366 pins; merging this PR is left to the maintainer.(Written by Claude Opus 5.5 with high)