-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(soundness): fix a soundness bug with the
Maybe<T>
type and the …
…`HasSchema` derive macro for generic types. (#456) There was a bug in the `HasSchema` derive macro for generic types, where the enum variant schema was returning the schema for a previously computed instantiation of the generic type, instead of specializing based on the Rust type ID. This fixes that, fixing undefined behavior that may be triggered when using `Maybe<T>` along with any other generic enums that have derived `HasSchema`. This should also fix #296, which I can't reproduce right now, but could have been caused randomly by `Maybe::schema()` being unsound. Fixes: #296
- Loading branch information
Showing
2 changed files
with
152 additions
and
4 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
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