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 13
13
from typing import Any , TypeAlias
14
14
15
15
ETC_DIR = Path (__file__ ).parent
16
+ ROOT_DIR = ETC_DIR .parent
16
17
17
18
IndexTy : TypeAlias = dict [str , dict [str , Any ]]
18
19
"""Type of the `index` item in rustdoc's JSON output"""
@@ -56,10 +57,12 @@ def get_rustdoc_json() -> dict[Any, Any]:
56
57
"--edition=2021" ,
57
58
"--document-private-items" ,
58
59
"--output-format=json" ,
60
+ "--cfg=f16_enabled" ,
61
+ "--cfg=f128_enabled" ,
59
62
"-Zunstable-options" ,
60
63
"-o-" ,
61
64
],
62
- cwd = ETC_DIR . parent ,
65
+ cwd = ROOT_DIR ,
63
66
text = True ,
64
67
)
65
68
j = json .loads (j )
@@ -105,8 +108,8 @@ def _init_defs(self, index: IndexTy) -> None:
105
108
106
109
# A lot of the `arch` module is often configured out so doesn't show up in docs. Use
107
110
# 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 ()
110
113
111
114
for name in self .public_functions :
112
115
if f"fn { name } " in contents :
You can’t perform that action at this time.
0 commit comments