@@ -176,29 +176,82 @@ macro_rules! __property {
176176#[ doc( hidden) ]
177177#[ macro_export]
178178macro_rules! property_internal {
179+ ( & $( $t: ident) ::+ $( :: <$( $t_ty_args: ty) ,* $( , ) ?>) ?
180+ . $method: tt $( :: <$( $m_ty_args: ty) ,* $( , ) ?>) ? ( $( $argument: expr) ,* $( , ) ?) ,
181+ ref $m: expr) => { {
182+ $crate:: property_internal!( @self_arg
183+ struct_type: [ & $( $t) ::+ $( <$( $t_ty_args) ,* >) * ]
184+ method_prefix: [ $( $t) ::+ $( :: <$( $t_ty_args) ,* >) * ]
185+ [ $method $( :: <$( $m_ty_args) ,* >) * ] [ $( $argument) ,* ] [ $m] )
186+ } } ;
187+ ( $( $t: ident) ::+ $( :: <$( $t_ty_args: ty) ,* $( , ) ?>) ?
188+ . $method: tt $( :: <$( $m_ty_args: ty) ,* $( , ) ?>) ? ( $( $argument: expr) ,* $( , ) ?) ,
189+ ref $m: expr) => { {
190+ $crate:: property_internal!( @self_arg
191+ struct_type: [ $( $t) ::+ $( <$( $t_ty_args) ,* >) * ]
192+ method_prefix: [ $( $t) ::+ $( :: <$( $t_ty_args) ,* >) * ]
193+ [ $method $( :: <$( $m_ty_args) ,* >) * ] [ $( $argument) ,* ] [ $m] )
194+ } } ;
195+ ( & :: $( $t: ident) ::+ $( :: <$( $t_ty_args: ty) ,* $( , ) ?>) ?
196+ . $method: tt $( :: <$( $m_ty_args: ty) ,* $( , ) ?>) ? ( $( $argument: expr) ,* $( , ) ?) ,
197+ ref $m: expr) => { {
198+ $crate:: property_internal!( @self_arg
199+ struct_type: [ & :: $( $t) ::+ $( <$( $t_ty_args) ,* >) * ]
200+ method_prefix: [ :: $( $t) ::+ $( :: <$( $t_ty_args) ,* >) * ]
201+ [ $method $( :: <$( $m_ty_args) ,* >) * ] [ $( $argument) ,* ] [ $m] )
202+ } } ;
203+ ( :: $( $t: ident) ::+ $( :: <$( $t_ty_args: ty) ,* $( , ) ?>) ?
204+ . $method: tt $( :: <$( $m_ty_args: ty) ,* $( , ) ?>) ? ( $( $argument: expr) ,* $( , ) ?) ,
205+ ref $m: expr) => { {
206+ $crate:: property_internal!( @self_arg
207+ struct_type: [ :: $( $t) ::+ $( <$( $t_ty_args) ,* >) * ]
208+ method_prefix: [ :: $( $t) ::+ $( :: <$( $t_ty_args) ,* >) * ]
209+ [ $method $( :: <$( $m_ty_args) ,* >) * ] [ $( $argument) ,* ] [ $m] )
210+ } } ;
179211
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) )
212+ ( & $( $t: ident) ::+ $( :: <$( $t_ty_args: ty) ,* $( , ) ?>) ?
213+ . $method: tt $( :: <$( $m_ty_args: ty) ,* $( , ) ?>) ? ( $( $argument: expr) ,* $( , ) ?) ,
214+ $m: expr) => { {
215+ $crate:: property_internal!( @self_dot
216+ struct_type: [ &&$( $t) ::+ $( <$( $t_ty_args) ,* >) * ]
217+ [ $method $( :: <$( $m_ty_args) ,* >) * ] [ $( $argument) ,* ] [ $m] )
185218 } } ;
186- ( $( $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) )
219+ ( $( $t: ident) ::+ $( :: <$( $t_ty_args: ty) ,* $( , ) ?>) ?
220+ . $method: tt $( :: <$( $m_ty_args: ty) ,* $( , ) ?>) ? ( $( $argument: expr) ,* $( , ) ?) ,
221+ $m: expr) => { {
222+ $crate:: property_internal!( @self_dot
223+ struct_type: [ & $( $t) ::+ $( <$( $t_ty_args) ,* >) * ]
224+ [ $method $( :: <$( $m_ty_args) ,* >) * ] [ $( $argument) ,* ] [ $m] )
191225 } } ;
192- ( & $( $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) ,* ) ,
195- & stringify!( $method( $( $argument) ,* ) ) ,
226+ ( & :: $( $t: ident) ::+ $( :: <$( $t_ty_args: ty) ,* $( , ) ?>) ?
227+ . $method: tt $( :: <$( $m_ty_args: ty) ,* $( , ) ?>) ? ( $( $argument: expr) ,* $( , ) ?) ,
228+ $m: expr) => { {
229+ $crate:: property_internal!( @self_dot
230+ struct_type: [ &&:: $( $t) ::+ $( <$( $t_ty_args) ,* >) * ]
231+ [ $method $( :: <$( $m_ty_args) ,* >) * ] [ $( $argument) ,* ] [ $m] )
232+ } } ;
233+ ( :: $( $t: ident) ::+ $( :: <$( $t_ty_args: ty) ,* $( , ) ?>) ?
234+ . $method: tt $( :: <$( $m_ty_args: ty) ,* $( , ) ?>) ? ( $( $argument: expr) ,* $( , ) ?) ,
235+ $m: expr) => { {
236+ $crate:: property_internal!( @self_dot
237+ struct_type: [ & :: $( $t) ::+ $( <$( $t_ty_args) ,* >) * ]
238+ [ $method $( :: <$( $m_ty_args) ,* >) * ] [ $( $argument) ,* ] [ $m] )
239+ } } ;
240+
241+ ( @self_arg struct_type: [ $struct_ty: ty]
242+ method_prefix: [ $( $method_prefix: tt) +]
243+ [ $( $method: tt) * ] [ $( $argument: expr) ,* ] [ $m: expr] ) => { {
244+ $crate:: matchers:: __internal_unstable_do_not_depend_on_these:: property_ref_matcher(
245+ |o: $struct_ty| $( $method_prefix) * :: $( $method) * ( o, $( $argument) ,* ) ,
246+ & stringify!( $( $method) * ( $( $argument) ,* ) ) ,
196247 $crate:: matcher_support:: __internal_unstable_do_not_depend_on_these:: auto_eq!( $m) )
197248 } } ;
198- ( $( $t: ident) ::+. $method: tt( $( $argument: expr) ,* $( , ) ?) , $m: expr) => { {
249+
250+ ( @self_dot struct_type: [ $struct_ty: ty]
251+ [ $( $method: tt) * ] [ $( $argument: expr) ,* ] [ $m: expr] ) => { {
199252 $crate:: matchers:: __internal_unstable_do_not_depend_on_these:: property_matcher(
200- |o: & $ ( $t ) ::+ | o. $method( $( $argument) ,* ) ,
201- & stringify!( $method( $( $argument) ,* ) ) ,
253+ |o: $struct_ty | o. $( $ method) * ( $( $argument) ,* ) ,
254+ & stringify!( $( $ method) * ( $( $argument) ,* ) ) ,
202255 $crate:: matcher_support:: __internal_unstable_do_not_depend_on_these:: auto_eq!( $m) )
203256 } } ;
204257}
0 commit comments