@@ -156,8 +156,8 @@ mod private
156156 pub fn verify_api_stability_facade ( ) -> bool
157157 {
158158 // Verify namespace modules are accessible
159- let _own_namespace_ok = crate :: own :: BTreeMap :: < i32 , String > :: new ( ) ;
160- let _exposed_namespace_ok = crate :: exposed :: HashMap :: < i32 , String > :: new ( ) ;
159+ let _own_namespace_ok = crate :: BTreeMap :: < i32 , String > :: new ( ) ;
160+ let _exposed_namespace_ok = crate :: HashMap :: < i32 , String > :: new ( ) ;
161161
162162 // Verify dependency isolation is working
163163 let _dependency_isolation_ok = crate :: dependency:: trybuild:: TestCases :: new ( ) ;
@@ -229,6 +229,10 @@ mod private
229229#[ cfg( feature = "enabled" ) ]
230230pub mod test;
231231
232+ /// Behavioral equivalence verification framework for re-exported utilities.
233+ #[ cfg( feature = "enabled" ) ]
234+ pub mod behavioral_equivalence;
235+
232236/// Aggegating submodules without using cargo, but including their entry files directly.
233237///
234238/// We don't want to run doctest of included files, because all of the are relative to submodule.
@@ -247,6 +251,17 @@ pub use standalone::*;
247251#[ cfg( not( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ) ]
248252pub use :: { error_tools, impls_index, mem_tools, typing_tools, diagnostics_tools} ;
249253
254+ // Re-export key mem_tools functions at root level for easy access
255+ #[ cfg( feature = "enabled" ) ]
256+ #[ cfg( not( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ) ]
257+ pub use mem_tools:: { same_data, same_ptr, same_size, same_region} ;
258+
259+ // Re-export error handling utilities at root level for easy access
260+ #[ cfg( feature = "enabled" ) ]
261+ #[ cfg( not( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ) ]
262+ #[ cfg( feature = "error_untyped" ) ]
263+ pub use error_tools:: { anyhow as error, bail, ensure, format_err} ;
264+
250265// Import process module
251266#[ cfg( feature = "enabled" ) ]
252267pub use test:: process;
@@ -305,6 +320,8 @@ pub use collection_tools::{into_heap, into_vec, into_bmap, into_bset, into_hmap,
305320#[ cfg( not( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ) ]
306321pub use error_tools:: error;
307322
323+ // Re-export error! macro as anyhow! from error_tools
324+
308325#[ cfg( feature = "enabled" ) ]
309326#[ cfg( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ]
310327pub use implsindex as impls_index;
@@ -362,9 +379,17 @@ pub mod own {
362379 #[ doc( inline ) ]
363380 pub use {
364381 error_tools:: { debug_assert_id, debug_assert_identical, debug_assert_ni, debug_assert_not_identical, ErrWith } ,
365- impls_index:: orphan:: * , mem_tools:: orphan:: * , typing_tools:: orphan:: * ,
382+ impls_index:: orphan:: * ,
383+ mem_tools:: orphan:: * , // This includes same_data, same_ptr, same_size, same_region
384+ typing_tools:: orphan:: * ,
366385 diagnostics_tools:: orphan:: * ,
367386 } ;
387+
388+ // Re-export error handling macros from error_tools for comprehensive access
389+ #[ cfg( not( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ) ]
390+ #[ cfg( feature = "error_untyped" ) ]
391+ #[ doc( inline ) ]
392+ pub use error_tools:: { anyhow as error, bail, ensure, format_err} ;
368393
369394 // Re-export collection_tools types selectively (no macros to avoid ambiguity)
370395 #[ cfg( not( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ) ]
@@ -410,9 +435,17 @@ pub mod exposed {
410435 #[ doc( inline ) ]
411436 pub use {
412437 error_tools:: { debug_assert_id, debug_assert_identical, debug_assert_ni, debug_assert_not_identical, ErrWith } ,
413- impls_index:: exposed:: * , mem_tools:: exposed:: * , typing_tools:: exposed:: * ,
438+ impls_index:: exposed:: * ,
439+ mem_tools:: exposed:: * , // This includes same_data, same_ptr, same_size, same_region
440+ typing_tools:: exposed:: * ,
414441 diagnostics_tools:: exposed:: * ,
415442 } ;
443+
444+ // Re-export error handling macros from error_tools for comprehensive access
445+ #[ cfg( not( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ) ]
446+ #[ cfg( feature = "error_untyped" ) ]
447+ #[ doc( inline ) ]
448+ pub use error_tools:: { anyhow as error, bail, ensure, format_err} ;
416449
417450 // Re-export collection_tools types and macros for exposed namespace
418451 #[ cfg( not( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ) ]
@@ -456,9 +489,17 @@ pub mod prelude {
456489 #[ doc( inline ) ]
457490 pub use {
458491 error_tools:: { debug_assert_id, debug_assert_identical, debug_assert_ni, debug_assert_not_identical, ErrWith } ,
459- impls_index:: prelude:: * , mem_tools:: prelude:: * , typing_tools:: prelude:: * ,
492+ impls_index:: prelude:: * ,
493+ mem_tools:: prelude:: * , // Memory utilities should be accessible in prelude too
494+ typing_tools:: prelude:: * ,
460495 diagnostics_tools:: prelude:: * ,
461496 } ;
497+
498+ // Re-export error handling macros from error_tools for comprehensive access
499+ #[ cfg( not( all( feature = "standalone_build" , not( feature = "normal_build" ) ) ) ) ]
500+ #[ cfg( feature = "error_untyped" ) ]
501+ #[ doc( inline ) ]
502+ pub use error_tools:: { anyhow as error, bail, ensure, format_err} ;
462503
463504
464505 // Collection constructor macros removed from re-exports to prevent std::vec! ambiguity.
0 commit comments