@@ -571,9 +571,11 @@ fn expand_impl_getset_properties(props: &[PropDesc]) -> Vec<syn::ImplItemFn> {
571
571
let span = p. attrs_span ;
572
572
parse_quote_spanned ! ( span=>
573
573
#[ must_use]
574
+ #[ allow( dead_code) ]
574
575
pub fn #ident( & self ) -> <#ty as #crate_ident:: property:: Property >:: Value {
575
576
self . property:: <<#ty as #crate_ident:: property:: Property >:: Value >( #stripped_name)
576
- } )
577
+ }
578
+ )
577
579
} ) ;
578
580
579
581
let setter = ( p. set . is_some ( ) && !p. is_construct_only ) . then ( || {
@@ -594,9 +596,12 @@ fn expand_impl_getset_properties(props: &[PropDesc]) -> Vec<syn::ImplItemFn> {
594
596
)
595
597
} ;
596
598
let span = p. attrs_span ;
597
- parse_quote_spanned ! ( span=> pub fn #ident<' a>( & self , value: #set_ty) {
598
- self . set_property_from_value( #stripped_name, & :: std:: convert:: From :: from( #upcasted_borrowed_value) )
599
- } )
599
+ parse_quote_spanned ! ( span=>
600
+ #[ allow( dead_code) ]
601
+ pub fn #ident<' a>( & self , value: #set_ty) {
602
+ self . set_property_from_value( #stripped_name, & :: std:: convert:: From :: from( #upcasted_borrowed_value) )
603
+ }
604
+ )
600
605
} ) ;
601
606
[ getter, setter]
602
607
} ) ;
@@ -612,11 +617,14 @@ fn expand_impl_connect_prop_notify(props: &[PropDesc]) -> Vec<syn::ImplItemFn> {
612
617
let stripped_name = strip_raw_prefix_from_name ( name) ;
613
618
let fn_ident = format_ident ! ( "connect_{}_notify" , name_to_ident( name) ) ;
614
619
let span = p. attrs_span ;
615
- parse_quote_spanned ! ( span=> pub fn #fn_ident<F : Fn ( & Self ) + ' static >( & self , f: F ) -> #crate_ident:: SignalHandlerId {
616
- self . connect_notify_local( :: core:: option:: Option :: Some ( #stripped_name) , move |this, _| {
617
- f( this)
618
- } )
619
- } )
620
+ parse_quote_spanned ! ( span=>
621
+ #[ allow( dead_code) ]
622
+ pub fn #fn_ident<F : Fn ( & Self ) + ' static >( & self , f: F ) -> #crate_ident:: SignalHandlerId {
623
+ self . connect_notify_local( :: core:: option:: Option :: Some ( #stripped_name) , move |this, _| {
624
+ f( this)
625
+ } )
626
+ }
627
+ )
620
628
} ) ;
621
629
connection_fns. collect :: < Vec < _ > > ( )
622
630
}
@@ -628,13 +636,16 @@ fn expand_impl_notify_prop(wrapper_type: &syn::Path, props: &[PropDesc]) -> Vec<
628
636
let fn_ident = format_ident ! ( "notify_{}" , name_to_ident( & name) ) ;
629
637
let span = p. attrs_span ;
630
638
let enum_ident = name_to_enum_ident ( name. value ( ) ) ;
631
- parse_quote_spanned ! ( span=> pub fn #fn_ident( & self ) {
632
- self . notify_by_pspec(
633
- & <<#wrapper_type as #crate_ident:: object:: ObjectSubclassIs >:: Subclass
634
- as #crate_ident:: subclass:: object:: DerivedObjectProperties >:: derived_properties( )
635
- [ DerivedPropertiesEnum :: #enum_ident as usize ]
636
- ) ;
637
- } )
639
+ parse_quote_spanned ! ( span=>
640
+ #[ allow( dead_code) ]
641
+ pub fn #fn_ident( & self ) {
642
+ self . notify_by_pspec(
643
+ & <<#wrapper_type as #crate_ident:: object:: ObjectSubclassIs >:: Subclass
644
+ as #crate_ident:: subclass:: object:: DerivedObjectProperties >:: derived_properties( )
645
+ [ DerivedPropertiesEnum :: #enum_ident as usize ]
646
+ ) ;
647
+ }
648
+ )
638
649
} ) ;
639
650
emit_fns. collect :: < Vec < _ > > ( )
640
651
}
0 commit comments