Commit e11c68c
committed
Improve names and types in Rust stdlib scraper…
Two main fixes:
1. Names: all pages except for modules' index pages ignored what module
they were from, and were just prepended with `std::`. This meant
there were 13 pages named `std::Iter`, about structs named `Iter`
from different modules. It also meant that things outside modules,
e.g. primitive types, were prefixed with `std::`, naming the page on
`bool` as `std::bool`, although it can't be referenced that way in
code. This also means that there are two pages named `std::char` -
one for the module, and one for the primitive type `char`.
This prefixes everything in a module with that module's path, and
does not prefix primitives. It also includes submodules in the path.
For example:
std::fn → fn
std::Iter → std::Option::Iter
std::MetadataExt → std::os::linux::fs::MetadataExt
2. Types: almost everything was filed in `std`, with the exception of
modules' index pages and primitive types. This meant there were over
30,000 pages in the `std` type, and many types for modules with only
one page in them.
This creates types for each module which include all submodules, and
files anything not in a module, e.g. primitive types, in `std`.
For example:
std::bool / std::bool → std / bool
std / std::Iter → std::option / std::option::Option::Iter1 parent 18a79e1 commit e11c68c
1 file changed
+15
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| |||
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
0 commit comments