mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Format components debugger and deny_public_fields #21373
This commit is contained in:
parent
577830de90
commit
e203cde9be
2 changed files with 24 additions and 18 deletions
|
@ -14,8 +14,10 @@ decl_derive!([DenyPublicFields] => deny_public_fields_derive);
|
|||
fn deny_public_fields_derive(s: synstructure::Structure) -> proc_macro::TokenStream {
|
||||
s.each(|binding| {
|
||||
if binding.ast().vis != syn::Visibility::Inherited {
|
||||
panic!("Field `{}` should not be public",
|
||||
binding.ast().ident.as_ref().unwrap_or(&binding.binding));
|
||||
panic!(
|
||||
"Field `{}` should not be public",
|
||||
binding.ast().ident.as_ref().unwrap_or(&binding.binding)
|
||||
);
|
||||
}
|
||||
|
||||
"".to_owned()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue