@@ -177,27 +177,65 @@ macro_rules! __property {
177177#[ macro_export]
178178macro_rules! property_internal {
179179
180- ( & $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , ref $m: expr) => { {
181- $crate:: matchers :: __internal_unstable_do_not_depend_on_these :: property_ref_matcher (
182- |o : & $( $t) ::+| $ ( $t ) ::+ :: $method ( o , $ ( $argument ) , * ) ,
183- & stringify! ( $method ( $ ( $argument ) , * ) ) ,
184- $crate :: matcher_support :: __internal_unstable_do_not_depend_on_these :: auto_eq! ( $m ) )
180+ ( & $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , ref $m: expr) => { {
181+ $crate:: property_internal! ( @self_arg
182+ struct_type : [ & $( $t) ::+]
183+ method_prefix : [ $ ( $t ) ::+ ]
184+ [ $method ] [ $ ( $argument ) , * ] [ $m ] )
185185 } } ;
186186 ( $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , ref $m: expr) => { {
187- $crate:: matchers:: __internal_unstable_do_not_depend_on_these:: property_ref_matcher(
188- |o: $( $t) ::+| $( $t) ::+:: $method( o, $( $argument) ,* ) ,
189- & stringify!( $method( $( $argument) ,* ) ) ,
190- $crate:: matcher_support:: __internal_unstable_do_not_depend_on_these:: auto_eq!( $m) )
187+ $crate:: property_internal!( @self_arg
188+ struct_type: [ $( $t) ::+]
189+ method_prefix: [ $( $t) ::+]
190+ [ $method] [ $( $argument) ,* ] [ $m] )
191+ } } ;
192+ ( & :: $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , ref $m: expr) => { {
193+ $crate:: property_internal!( @self_arg
194+ struct_type: [ & :: $( $t) ::+]
195+ method_prefix: [ :: $( $t) ::+]
196+ [ $method] [ $( $argument) ,* ] [ $m] )
197+ } } ;
198+ ( :: $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , ref $m: expr) => { {
199+ $crate:: property_internal!( @self_arg
200+ struct_type: [ :: $( $t) ::+]
201+ method_prefix: [ :: $( $t) ::+]
202+ [ $method] [ $( $argument) ,* ] [ $m] )
191203 } } ;
204+
192205 ( & $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , $m: expr) => { {
193- $crate:: matchers:: __internal_unstable_do_not_depend_on_these:: property_matcher(
194- |o: &&$( $t) ::+| o. $method( $( $argument) ,* ) ,
206+ $crate:: property_internal!( @self_dot
207+ struct_type: [ &&$( $t) ::+]
208+ [ $method] [ $( $argument) ,* ] [ $m] )
209+ } } ;
210+ ( $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , $m: expr) => { {
211+ $crate:: property_internal!( @self_dot
212+ struct_type: [ & $( $t) ::+]
213+ [ $method] [ $( $argument) ,* ] [ $m] )
214+ } } ;
215+ ( & :: $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , $m: expr) => { {
216+ $crate:: property_internal!( @self_dot
217+ struct_type: [ &&:: $( $t) ::+]
218+ [ $method] [ $( $argument) ,* ] [ $m] )
219+ } } ;
220+ ( :: $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , $m: expr) => { {
221+ $crate:: property_internal!( @self_dot
222+ struct_type: [ & :: $( $t) ::+]
223+ [ $method] [ $( $argument) ,* ] [ $m] )
224+ } } ;
225+
226+ ( @self_arg struct_type: [ $struct_ty: ty]
227+ method_prefix: [ $( $method_prefix: tt) +]
228+ [ $method: tt] [ $( $argument: expr) ,* ] [ $m: expr] ) => { {
229+ $crate:: matchers:: __internal_unstable_do_not_depend_on_these:: property_ref_matcher(
230+ |o: $struct_ty| $( $method_prefix) * :: $method ( o, $( $argument) ,* ) ,
195231 & stringify!( $method( $( $argument) ,* ) ) ,
196232 $crate:: matcher_support:: __internal_unstable_do_not_depend_on_these:: auto_eq!( $m) )
197233 } } ;
198- ( $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , $m: expr) => { {
234+
235+ ( @self_dot struct_type: [ $struct_ty: ty]
236+ [ $method: tt] [ $( $argument: expr) ,* ] [ $m: expr] ) => { {
199237 $crate:: matchers:: __internal_unstable_do_not_depend_on_these:: property_matcher(
200- |o: & $ ( $t ) ::+ | o. $method( $( $argument) ,* ) ,
238+ |o: $struct_ty | o. $method ( $( $argument) ,* ) ,
201239 & stringify!( $method( $( $argument) ,* ) ) ,
202240 $crate:: matcher_support:: __internal_unstable_do_not_depend_on_these:: auto_eq!( $m) )
203241 } } ;
0 commit comments