@@ -227,23 +227,24 @@ macro_rules! internal_prudent_unsafe_method {
227227 (
228228 $( ~allow_unsafe $( { $allow_unsafe_empty_indicator: tt } ) ? ) ?
229229 $( ~expect_unsafe $( { $expect_unsafe_empty_indicator: tt } ) ? ) ?
230- $self: expr =>@ $fn : ident
230+ $self: expr =>@ $method : ident
231231 ) => {
232232 internal_prudent_unsafe_method!(
233233 $( ~allow_unsafe $( { $allow_unsafe_empty_indicator } ) ? ) ?
234234 $( ~expect_unsafe $( { $expect_unsafe_empty_indicator } ) ? ) ?
235- $self =>@ $fn =>
235+ $self =>@ $method =>
236236 )
237237 } ;
238238 (
239239 $( ~allow_unsafe $( { $allow_unsafe_empty_indicator: tt } ) ? ) ?
240240 $( ~expect_unsafe $( { $expect_unsafe_empty_indicator: tt } ) ? ) ?
241- $self: expr =>@ $fn : ident => $( $arg: expr ) ,*
241+ $self: expr =>@ $method : ident => $( $arg: expr ) ,*
242242 ) => {
243243 // See unsafe_fn for why here we enclose in (...) and not in {...}.
244244 (
245245 if false {
246- :: prudent:: allow_unsafe_expect_unsafe_is_correct!{
246+ // no module needed in the following macro path, since allow_unsafe_expect_unsafe_is_correct has #[macro_export]
247+ :: prudent:: max_one_active_of_allow_unsafe_expect_unsafe!{
247248 $( ~allow_unsafe $( { $allow_unsafe_empty_indicator } ) ? ) ?
248249 $( ~expect_unsafe $( { $expect_unsafe_empty_indicator } ) ? ) ?
249250 }
@@ -280,10 +281,13 @@ macro_rules! internal_prudent_unsafe_method {
280281 #[ allow( unused_mut) ]
281282 #[ allow( invalid_value) ] // for &str and other types where zeroed() issues invalid_value warning.
282283 let mut owned_receiver = :: core:: mem:: replace( mref, unsafe { :: core:: mem:: zeroed( ) } ) ;
283- // Detect code where unsafe_fn! or unsafe_method! is not needed at all. That is,
284- // where a function/method used to be `unsafe`, but it stopped being so .
284+ // Detect code where unsafe_method! is not needed at all. Maybe the method used
285+ // to be `unsafe`, but not anymore .
285286 #[ deny( unused_unsafe) ]
286- let _ = unsafe { owned_receiver. $fn( $( $arg ) ,* ) } ;
287+ let _ = unsafe { owned_receiver. $method( $( $arg ) ,* ) } ;
288+ //@TODO here call the method with tuple tree-stored evaluated args.
289+ //
290+ //THEN simplify internal_prudent_unsafe_method_internal_check_args_etc -> internal_prudent_unsafe_method_internal_build_accessors_check_args_call
287291 } else {
288292 // @TODO eliminate
289293 $(
@@ -296,7 +300,7 @@ macro_rules! internal_prudent_unsafe_method {
296300 internal_prudent_unsafe_method_internal_check_args_etc!(
297301 $( ~allow_unsafe $( { $allow_unsafe_empty_indicator } ) ? ) ?
298302 $( ~expect_unsafe $( { $expect_unsafe_empty_indicator } ) ? ) ?
299- $self, $fn $( , $arg ) *
303+ $self, $method $( , $arg ) *
300304 )
301305 }
302306 )
0 commit comments