Change error message around #[init]
This commit is contained in:
parent
8550e0f575
commit
f0526eb739
|
@ -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") {
|
||||
|
|
Loading…
Reference in a new issue