Change error message around #[init]

This commit is contained in:
kngwyu 2019-11-02 14:44:16 +09:00
parent 8550e0f575
commit f0526eb739

View file

@ -292,8 +292,8 @@ fn parse_attributes(attrs: &mut Vec<syn::Attribute>) -> 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::Attribute>) -> 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") {