-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support @rust.Ord structured annotation on unions
Summary: The Rust Thrift templates already correctly handle unions that need an Ord impl; it just turns into a `#[derive(Ord)]` on the generated data structure. But unless the implementation of the `rust.Ord` annotation declares that it is compatible with unions, the Thrift compiler rejects `rust.Ord` on unions. ```lang=text,counterexample [ERROR:dataswarm/services/if/operators.thrift:80] `Ord` cannot annotate `UnionOfAny` ``` Reviewed By: zertosh Differential Revision: D62074164 fbshipit-source-id: a22908d1b54ba1b436aec7667bbceddc0acf712a
- Loading branch information
1 parent
b8d5ece
commit 1000892
Showing
6 changed files
with
68 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,7 @@ struct Exhaustive { | |
|
||
@scope.Struct | ||
@scope.Typedef | ||
@scope.Union | ||
struct Ord { | ||
// # `rust.Ord` | ||
// | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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