This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1313from typing import Any , TypeAlias
1414
1515ETC_DIR = Path (__file__ ).parent
16+ ROOT_DIR = ETC_DIR .parent
1617
1718IndexTy : TypeAlias = dict [str , dict [str , Any ]]
1819"""Type of the `index` item in rustdoc's JSON output"""
@@ -56,10 +57,12 @@ def get_rustdoc_json() -> dict[Any, Any]:
5657 "--edition=2021" ,
5758 "--document-private-items" ,
5859 "--output-format=json" ,
60+ "--cfg=f16_enabled" ,
61+ "--cfg=f128_enabled" ,
5962 "-Zunstable-options" ,
6063 "-o-" ,
6164 ],
62- cwd = ETC_DIR . parent ,
65+ cwd = ROOT_DIR ,
6366 text = True ,
6467 )
6568 j = json .loads (j )
@@ -105,8 +108,8 @@ def _init_defs(self, index: IndexTy) -> None:
105108
106109 # A lot of the `arch` module is often configured out so doesn't show up in docs. Use
107110 # string matching as a fallback.
108- for fname in glob ("src/math/arch/**.rs" , root_dir = ETC_DIR . parent ):
109- contents = Path ( fname ).read_text ()
111+ for fname in glob ("src/math/arch/**.rs" , root_dir = ROOT_DIR ):
112+ contents = ( ROOT_DIR . joinpath ( fname ) ).read_text ()
110113
111114 for name in self .public_functions :
112115 if f"fn { name } " in contents :
You can’t perform that action at this time.
0 commit comments