@@ -1905,46 +1905,50 @@ macro_rules! sty_debug_print {
1905
1905
1906
1906
impl < ' tcx > TyCtxt < ' tcx > {
1907
1907
pub fn debug_stats ( self ) -> impl std:: fmt:: Debug + ' tcx {
1908
- DebugStats ( self )
1909
- }
1910
- }
1908
+ struct DebugStats < ' tcx > ( TyCtxt < ' tcx > ) ;
1909
+
1910
+ impl std:: fmt:: Debug for DebugStats < ' tcx > {
1911
+ fn fmt ( & self , fmt : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
1912
+ sty_debug_print ! (
1913
+ fmt,
1914
+ self . 0 ,
1915
+ Adt ,
1916
+ Array ,
1917
+ Slice ,
1918
+ RawPtr ,
1919
+ Ref ,
1920
+ FnDef ,
1921
+ FnPtr ,
1922
+ Placeholder ,
1923
+ Generator ,
1924
+ GeneratorWitness ,
1925
+ Dynamic ,
1926
+ Closure ,
1927
+ Tuple ,
1928
+ Bound ,
1929
+ Param ,
1930
+ Infer ,
1931
+ Projection ,
1932
+ Opaque ,
1933
+ Foreign
1934
+ ) ?;
1935
+
1936
+ writeln ! ( fmt, "InternalSubsts interner: #{}" , self . 0 . interners. substs. len( ) ) ?;
1937
+ writeln ! ( fmt, "Region interner: #{}" , self . 0 . interners. region. len( ) ) ?;
1938
+ writeln ! ( fmt, "Stability interner: #{}" , self . 0 . stability_interner. len( ) ) ?;
1939
+ writeln ! (
1940
+ fmt,
1941
+ "Const Stability interner: #{}" ,
1942
+ self . 0 . const_stability_interner. len( )
1943
+ ) ?;
1944
+ writeln ! ( fmt, "Allocation interner: #{}" , self . 0 . allocation_interner. len( ) ) ?;
1945
+ writeln ! ( fmt, "Layout interner: #{}" , self . 0 . layout_interner. len( ) ) ?;
1946
+
1947
+ Ok ( ( ) )
1948
+ }
1949
+ }
1911
1950
1912
- struct DebugStats < ' tcx > ( TyCtxt < ' tcx > ) ;
1913
-
1914
- impl std:: fmt:: Debug for DebugStats < ' tcx > {
1915
- fn fmt ( & self , fmt : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
1916
- sty_debug_print ! (
1917
- fmt,
1918
- self . 0 ,
1919
- Adt ,
1920
- Array ,
1921
- Slice ,
1922
- RawPtr ,
1923
- Ref ,
1924
- FnDef ,
1925
- FnPtr ,
1926
- Placeholder ,
1927
- Generator ,
1928
- GeneratorWitness ,
1929
- Dynamic ,
1930
- Closure ,
1931
- Tuple ,
1932
- Bound ,
1933
- Param ,
1934
- Infer ,
1935
- Projection ,
1936
- Opaque ,
1937
- Foreign
1938
- ) ?;
1939
-
1940
- writeln ! ( fmt, "InternalSubsts interner: #{}" , self . 0 . interners. substs. len( ) ) ?;
1941
- writeln ! ( fmt, "Region interner: #{}" , self . 0 . interners. region. len( ) ) ?;
1942
- writeln ! ( fmt, "Stability interner: #{}" , self . 0 . stability_interner. len( ) ) ?;
1943
- writeln ! ( fmt, "Const Stability interner: #{}" , self . 0 . const_stability_interner. len( ) ) ?;
1944
- writeln ! ( fmt, "Allocation interner: #{}" , self . 0 . allocation_interner. len( ) ) ?;
1945
- writeln ! ( fmt, "Layout interner: #{}" , self . 0 . layout_interner. len( ) ) ?;
1946
-
1947
- Ok ( ( ) )
1951
+ DebugStats ( self )
1948
1952
}
1949
1953
}
1950
1954
0 commit comments