@@ -19,7 +19,7 @@ const _VERIFY_MODULE_PATH: () = {
1919 [ b'p' , b'r' , b'u' , b'd' , b'e' , b'n' , b't' , b':' , b':' , ..]
2020 ) {
2121 panic ! (
22- "Use ONLY linted.rs with ::prudent::load in your crate. Do not use linted_internal.rs."
22+ "Use ONLY linted.rs in your crate(s) . Do not use linted_internal.rs, as that is internal ."
2323 ) ;
2424 }
2525} ;
@@ -33,7 +33,7 @@ const _VERIFY_MODULE_PATH: () = {
3333/// any). If there was such a pair, it could be confused for a tuple. It would also be less readable
3434/// when some parameters were tuples/complex expressions.
3535///
36- /// This does NOT accept closures, since, closures cannot be `unsafe`.
36+ /// This does NOT accept closures, since closures cannot be `unsafe`.
3737///
3838/// # Possible violations
3939/// - Zero arguments. The given expression (which evaluates to the function to be called) is
@@ -65,22 +65,23 @@ macro_rules! internal_prudent_unsafe_fn {
6565 //
6666 // (That minimizes the number of differences between those two files.)
6767 //
68- // Here we can't refer to
69- // - $crate::internal_prudent_unsafe_fn_internal_build_tuple_tree, nor
70- // - crate::internal_prudent_unsafe_fn_internal_build_tuple_tree
68+ // If this file is linted.rs (which then is passed to ::prudent::load!(...)), then
69+ // here we can *not* refer to
70+ // - $crate::unsafe_method, nor
71+ // - crate::unsafe_method
7172 //
7273 // because of error "macro-expanded `macro_export` macros from the current crate
7374 // cannot be referred to by absolute paths"
7475 // https://github.com/rust-lang/rust/issues/52234
75- // macro_expanded_macro_exports_accessed_by_absolute_paths which also can't be fully
76- // suppressed. So we refer to
77- // `internal_prudent_unsafe_fn_internal_build_tuple_tree` .
76+ // " macro_expanded_macro_exports_accessed_by_absolute_paths", which can't be fully
77+ // suppressed! (See also
78+ // https://stackoverflow.com/questions/26731243/how-do-i-use-a-macro-across-module-files) .
7879 //
79- // If we are in linted.rs was "loaded" by the user "dynamically" from its file, then
80- // by forwarding to ::prudent::XXXX macros here we do use two sets of the same
81- // macros. But that hardly affects the compile time .
80+ // Also, we want to avoid name conflicts due to short names (for example
81+ // `unsafe_method`). So we add prefix `internal_prudent_`, and we refer to
82+ // `internal_prudent_unsafe_method` instead .
8283 //
83- // This applies to all other linted-to-linted macros calls in this file .
84+ // This applies to all other linted-to-linted macros calls in linted.rs .
8485 let ( tuple_tree, fun) = ( internal_prudent_unsafe_fn_internal_build_tuple_tree!{ $( $arg) ,+ } , $fn) ;
8586
8687 if false {
0 commit comments