From 37472702dc7a00f08ba081350041ac15b3cd92ef Mon Sep 17 00:00:00 2001 From: Icxolu <10486322+Icxolu@users.noreply.github.com> Date: Sun, 26 May 2024 15:33:00 +0200 Subject: [PATCH] simplify `hash` without `frozen` error message Co-authored-by: David Hewitt --- pyo3-macros-backend/src/pyclass.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyo3-macros-backend/src/pyclass.rs b/pyo3-macros-backend/src/pyclass.rs index 30aa3ffe894..72042598d00 100644 --- a/pyo3-macros-backend/src/pyclass.rs +++ b/pyo3-macros-backend/src/pyclass.rs @@ -1672,7 +1672,7 @@ fn pyclass_hash( ctx: &Ctx, ) -> Result<(Option, Option)> { 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 {