Skip to content

Commit

Permalink
simplify hash without frozen error message
Browse files Browse the repository at this point in the history
Co-authored-by: David Hewitt <[email protected]>
  • Loading branch information
Icxolu and davidhewitt authored May 26, 2024
1 parent 68a2cd7 commit 3747270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyo3-macros-backend/src/pyclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ fn pyclass_hash(
ctx: &Ctx,
) -> Result<(Option<syn::ImplItemFn>, Option<MethodAndSlotDef>)> {
if options.hash.is_some() && options.frozen.is_none() {
bail_spanned!(options.hash.span() => "The `hash` option can only be using in conjunction with `frozen`.");
bail_spanned!(options.hash.span() => "The `hash` option requires the `frozen` option.");
}
// FIXME: Use hash.map(...).unzip() on MSRV >= 1.66
match options.hash {
Expand Down

0 comments on commit 3747270

Please sign in to comment.