From f0526eb7391572039652b6bcbf691b640f555690 Mon Sep 17 00:00:00 2001 From: kngwyu Date: Sat, 2 Nov 2019 14:44:16 +0900 Subject: [PATCH] Change error message around #[init] --- pyo3-derive-backend/src/method.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyo3-derive-backend/src/method.rs b/pyo3-derive-backend/src/method.rs index 79d600c3..b1959780 100644 --- a/pyo3-derive-backend/src/method.rs +++ b/pyo3-derive-backend/src/method.rs @@ -292,8 +292,8 @@ fn parse_attributes(attrs: &mut Vec) -> syn::Result<(FnType, Vec } else if name.is_ident("init") || name.is_ident("__init__") { return Err(syn::Error::new_spanned( name, - "#[init] is duplicated from PyO3 0.9.0!", - )) + "#[init] is disabled from PyO3 0.9.0", + )); } else if name.is_ident("call") || name.is_ident("__call__") { res = Some(FnType::FnCall) } else if name.is_ident("classmethod") { @@ -326,8 +326,8 @@ fn parse_attributes(attrs: &mut Vec) -> syn::Result<(FnType, Vec } else if path.is_ident("init") { return Err(syn::Error::new_spanned( path, - "#[init] is duplicated from PyO3 0.9.0!", - )) + "#[init] is disabled from PyO3 0.9.0", + )); } else if path.is_ident("call") { res = Some(FnType::FnCall) } else if path.is_ident("setter") || path.is_ident("getter") {