Josh Stone
0999b019f8
Dogfood feature(file_buffered)
2024-09-24 14:25:16 -07:00
Michael Goulet
c682aa162b
Reformat using the new identifier sorting from rustfmt
2024-09-22 19:11:29 -04:00
bors
712463de61
Auto merge of #129789 - notriddle:notriddle/inline-stmt-local, r=GuillaumeGomez
...
rustdoc: use strategic boxing to shrink `clean::Item`
* `inline_stmt_id` is never a cross-crate DefId, so save space by not storing it.
* Instead of two inner boxes for `Item`, use one.
2024-09-09 23:16:56 +00:00
Michael Howell
65903362ad
rustdoc: use a single box to store Attributes and ItemKind
2024-09-07 21:06:50 -07:00
schvv31n
f2696ab4d3
rustdoc: normalise type/field names in rustdoc-json-types/jsondoclint
2024-09-01 23:58:08 +03:00
Nicholas Nethercote
37d1ce91b5
Remove #[macro_use] extern crate tracing from rustdoc.
2024-08-30 13:16:08 +10:00
Alona Enraght-Moony
321d40f060
rustdoc-json: Clean up serialization and printing.
2024-08-17 11:00:26 +00:00
Alona Enraght-Moony
9028b5381b
rustdoc-json: Use FxHashMap from rustdoc_json_types
2024-08-15 13:12:11 +00:00
Guillaume Gomez
18d62008d4
Add possibility to generate rustdoc JSON output to stdout
2024-08-12 13:50:29 +02:00
Matthias Krüger
376a6f9f43
Rollup merge of #128385 - its-the-shrimp:fix_114039, r=aDotInTheVoid
...
rustdoc-json: discard non-local inherent impls for primitives
Fixes #114039
at least it should
r? `@aDotInTheVoid`
2024-08-05 18:36:01 +02:00
schvv31n
7499e21a1e
rustdoc-json: discard non-local inherent impls
2024-08-05 11:19:22 +01:00
Alona Enraght-Moony
73ac5e0c6e
rustdoc: Remove OpaqueTy
2024-08-01 15:57:45 +00:00
Nicholas Nethercote
84ac80f192
Reformat use declarations.
...
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Boxy
432c11feb6
Remove Type from rustdoc Const
2024-06-05 22:25:42 +01:00
Mark Rousskov
917f6540ed
Re-format code with new rustfmt
2023-11-15 21:45:48 -05:00
Noah Lev
c90a5b2019
rustdoc-json: Rename typedef to type alias
2023-08-21 14:02:34 -07:00
Guillaume Gomez
a1a94b1c0f
Improve code readability by moving fmt args directly into the string
2023-08-16 16:35:23 +02:00
Alona Enraght-Moony
2b7dd084a3
rustdoc-json: Time serialization.
2023-04-26 14:55:30 +00:00
Guillaume Gomez
364e961417
Replace doc(primitive) with rustc_doc_primitive
2023-03-30 22:56:52 +02:00
Guillaume Gomez
1ae875f0a3
Improve code readability
2023-02-18 18:28:17 +01:00
Guillaume Gomez
3adc081254
Fix bad handling of primitive types
2023-02-18 18:28:17 +01:00
Guillaume Gomez
0541a0c8c3
Allow reexports of items with same name but different types to both appear
2023-02-18 18:13:23 +01:00
Guillaume Gomez
86fd5a1b44
Use more let chain
2023-02-15 12:00:03 +01:00
Guillaume Gomez
cc8758480c
Fix small debug typo
2023-02-08 17:31:54 +01:00
Vadim Petrochenkov
68803926e0
rustdoc: Use DefId(Map,Set) instead of FxHash(Map,Set)
...
Not all uses are converted, a few cases iterating through maps/sets and requiring nontrivial changes are kept.
2023-01-22 02:12:05 +04:00
Nixon Enraght-Moony
881bd865ad
Rustdoc-Json: Don't include foreign traits
2022-12-02 16:58:10 +00:00
Vadim Petrochenkov
b32a4edb20
rustc_ast_lowering: Stop lowering imports into multiple items
...
Lower them into a single item with multiple resolutions instead.
This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-12-01 18:51:20 +03:00
Martin Nordholts
8b5bfaf662
rustdoc JSON: Use Function everywhere and remove Method
2022-11-16 20:24:03 +01:00
cui fliter
442f848d74
fix some typos in comments
...
Signed-off-by: cui fliter <imcusg@gmail.com >
2022-11-13 15:26:17 +08:00
Michael Howell
a63a03dc54
rustdoc: remove clean::TraitWithExtraInfo
...
Instead, it gathers the extra info later, when it's actually requested.
2022-09-27 12:27:04 -07:00
Nixon Enraght-Moony
aac7429c17
Rustdoc-Json: List impls for primitives
...
Closes #101695
2022-09-26 18:06:48 +01:00
Nixon Enraght-Moony
e80ccd3d3a
Rustdoc-Json: Don't loose subitems of foreign traits.
2022-09-13 18:34:15 +01:00
Matthias Krüger
ecd908ac5e
Rollup merge of #101106 - aDotInTheVoid:rdj-stripped-mod, r=GuillaumeGomez
...
Rustdoc-Json: Retain Stripped Modules when they are imported, not when they have items
Fixes #101103
Fixes #100973
r? `@GuillaumeGomez`
2022-08-29 21:12:56 +02:00
Nixon Enraght-Moony
8050c1993b
Rustdoc-Json: Retain Stripped Modules when they are imported, not when they have items.
...
Fixes #101103
Fixes #100973
2022-08-29 00:15:10 +01:00
bors
ce36e88256
Auto merge of #100497 - kadiwa4:remove_clone_into_iter, r=cjgillot
...
Avoid cloning a collection only to iterate over it
`@rustbot` label: +C-cleanup
2022-08-28 18:31:08 +00:00
Martin Nordholts
dbeb506eae
rustdoc JSON: Fix ICE with pub extern crate self as <self_crate_name>
2022-08-16 15:54:50 +02:00
KaDiWa
4eebcb9910
avoid cloning and then iterating
2022-08-13 16:16:52 +02:00
Guillaume Gomez
1a15c7147f
Fix rustdoc JSON inline
2022-07-16 13:39:38 +02:00
Guillaume Gomez
87d90b1332
Fix rustdoc handling of primitive documentation
2022-06-17 14:41:07 +02:00
Guillaume Gomez
a752f82f19
Ignore impl items because they can be duplicated in case of generic impl
2022-06-13 15:29:29 +02:00
Guillaume Gomez
77e729ea92
Add Symbol into rustdoc JSON ID to prevent conflicts between reexports
2022-06-02 11:14:32 +02:00
Jacob Pratt
6970246886
Remove crate visibility modifier in libs, tests
2022-05-21 00:32:47 -04:00
Guillaume Gomez
b1e6211c5c
Rename def_id into item_id when the type is ItemId for readability
2022-04-16 14:28:09 +02:00
Nixon Enraght-Moony
a5c0b1470c
rustdoc-json-types: implementors -> implementations
...
Closes #94198
2022-03-14 00:05:11 +00:00
Nixon Enraght-Moony
ae158224ac
rustdoc-json: buffer output
2022-02-13 01:25:54 +00:00
Rune Tynan
f4b42946c8
Remove FIXME and fix inconsistency of local blanket impls by using HIR for them
2022-01-21 13:01:58 -05:00
Matthias Krüger
51fd48f157
Rollup merge of #93099 - tomkris:rustdoc-fix, r=jsha
...
rustdoc: auto create output directory when "--output-format json"
This PR allows rustdoc to automatically create output directory in case it does not exist (when run with `--output-format json`).
This fixes rustdoc crash:
````
$ rustdoc --output-format json -Z unstable-options src/main.rs
error: couldn't generate documentation: No such file or directory (os error 2)
|
= note: failed to create or modify "doc/main.json"
error: aborting due to previous error
````
With this fix behavior of `rustdoc --output-format json` becomes consistent with `rustdoc --output-format html` (which already auto-creates output directory if it's missing)
2022-01-20 23:37:39 +01:00
Matthias Krüger
530c884372
Rollup merge of #92860 - CraftSpider:rustdoc-json-impl-ice, r=jsha
...
Fix errors on blanket impls by ignoring the children of generated impls
Related to #83718
We can safely skip the children, as they don't contain any new info, and may be subtly different for reasons hard to track down, in ways that are consistently worse than the actual generic impl.
2022-01-20 23:37:31 +01:00
Artem Kryvokrysenko
4e17170c54
rustdoc: auto create output directory when "--output-format json"
...
This PR allows rustdoc to automatically create output directory in case
it does not exist (when run with `--output-format json`).
This fixes rustdoc crash:
````
$ rustdoc --output-format json -Z unstable-options src/main.rs
error: couldn't generate documentation: No such file or directory (os error 2)
|
= note: failed to create or modify "doc/main.json"
error: aborting due to previous error
````
With this fix behavior of `rustdoc --output-format json` becomes consistent
with `rustdoc --output-format html` (which already auto-creates output
directory if it's missing)
2022-01-19 22:28:07 -08:00
Nicholas Nethercote
10b1c9aa8b
rustdoc: avoid many Symbol to String conversions.
...
Particularly when constructing file paths and fully qualified paths.
This avoids a lot of allocations, speeding things up on almost all
examples.
2022-01-14 11:57:18 -08:00