diff --git a/src/pycell.rs b/src/pycell.rs index 4fe93941e87..2c1aee788c5 100644 --- a/src/pycell.rs +++ b/src/pycell.rs @@ -267,7 +267,13 @@ unsafe impl PyLayout for PyCellBase where U: PySizedLayout {} /// ``` /// For more information on how, when and why (not) to use `PyCell` please see the /// [module-level documentation](self). -#[deprecated(since = "0.21.0")] +#[cfg_attr( + not(feature = "gil-refs"), + deprecated( + since = "0.21.0", + note = "`PyCell` was merged into `Bound`, use that instead; see the migration guide for more info" + ) +)] #[repr(C)] pub struct PyCell { ob_base: ::LayoutAsBase,