bors
7ed1a51b25
Auto merge of #131980 - matthiaskrgr:rollup-iy5nw71, r=matthiaskrgr
...
Rollup of 5 pull requests
Successful merges:
- #131814 (`optimize` attribute applied to things other than methods/functions/c…)
- #131927 (Check for filecheck directives in files marked `skip-filecheck`)
- #131967 (Remove `lower_mono_bounds`)
- #131973 (fix(rustdoc-json-types): document rustc-hash feature)
- #131976 (feat(rustdoc-json-types): mark simple enums as copy)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-20 21:40:21 +00:00
Matthias Krüger
4b658657da
Rollup merge of #131976 - jalil-salame:rustdoc-types-copy-enums, r=aDotInTheVoid
...
feat(rustdoc-json-types): mark simple enums as copy
Fixes rust-lang/rustdoc-types#26 and some typos in the documentation
r? `@aDotInTheVoid`
I have been assigning these PRs to you `@aDotInTheVoid,` is that okay? I think I'm out of PRs for now, but for future reference c:
2024-10-20 21:04:15 +02:00
Jalil David Salamé Messina
afa75f0aa5
fix(rustdoc-json-types): typos
...
Typos found some typos in the file, so I fixed them c:
2024-10-20 19:01:36 +02:00
Jalil David Salamé Messina
f047591652
feat(rustdoc-json-types): mark simple enums as copy
...
Fixes [rust-lang/rustdoc-types#26 ](https://github.com/rust-lang/rustdoc-types/issues/26 )
2024-10-20 19:01:36 +02:00
Jalil David Salamé Messina
880d565df1
fix(rustdoc-json-types): document rustc-hash feature
...
The `rustc-hash` feature is publicly exposed by the `rustdoc-types`. It
is already documented in that crate's README and Cargo.toml, but we
might as well add some information to the crate docs themselves c:
Follow up to:
- #131936
- [rust-lang/rustdoc-types#42 ][1]
[1]: https://github.com/rust-lang/rustdoc-types/pull/42
2024-10-20 18:31:29 +02:00
Noratrieb
4348383a0f
Update rustc-hash to version 2
...
This brings in the new algorithm.
2024-10-20 00:12:49 -07:00
Jalil David Salamé Messina
d1fa49b2e6
feat(rustdoc-json-types): introduce rustc-hash feature
...
This allows the public `rustdoc-types` crate to expose this feature
easily and allows consumers of the crate to get the performance
advantages from doing so.
The reasoning for this was discussed on [Zulip][1]
Changes:
- Make `rustc-hash` optional but default to including it
- Rename all occurrences of `FxHashMap` to `HashMap`.
- Feature gate the import and rename the imported `FxHashMap` to
`HashMap`
- Introduce a type alias `FxHashMap` which resolves to the currently
used `HashMap` (`rustc_hash::FxHashMap` or
`std::collections::HashMap`) for use in `src/librustdoc`.
[1]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/rustc-hash.20and.20performance.20of.20rustdoc-types
2024-10-19 18:15:09 +02:00
León Orell Valerian Liehr
2e6f3bd1d3
rustdoc-JSON: Rename "object safe" to "dyn compatible"
2024-10-16 23:00:49 +02:00
Trevor Gross
05c0591321
Rollup merge of #130078 - its-the-shrimp:rustdoc-types-compress-ids, r=aDotInTheVoid
...
rustdoc-json: change item ID's repr from a string to an int
Following [this discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Optimizing.20the.20.60Id.60.20type.20in.20.60rustdoc-types.60 ), I've changed the repr of `rustdoc_json_types::Id` from a String to a u32, by adding a `clean::ItemId` interner to `JsonRenderer`
r? ``@aDotInTheVoid``
2024-10-11 16:53:46 -05:00
m
1b5c05433a
fix typo in rustdoc-json-types comment
2024-10-10 23:18:06 -07:00
schvv31n
1e30b5ae45
rustdoc-json: Id(String)
-> Id(u32)
2024-09-29 22:09:47 +01:00
Predrag Gruevski
3b9db47f07
rustdoc: update ProcMacro
docs section on helper attributes
...
I believe the mention of attribute macros in the section on proc macro helper attributes is erroneous. As far as I can tell, attribute macros cannot define helper attributes.
The following attribute macro is not valid (fails to build), no matter how I try to define (or skip defining) the helpers:
```rust
#[proc_macro_attribute(attributes(helper))]
pub fn attribute_helpers(_attr: TokenStream, item: TokenStream) -> TokenStream {
item
}
```
The [language reference](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros ) also doesn't seem to mention attribute macro helpers. The helpers subsection is inside the section on derive macros.
2024-09-27 14:34:48 -04:00
schvv31n
f2696ab4d3
rustdoc: normalise type/field names in rustdoc-json-types/jsondoclint
2024-09-01 23:58:08 +03:00
Alona Enraght-Moony
9028b5381b
rustdoc-json: Use FxHashMap from rustdoc_json_types
2024-08-15 13:12:11 +00:00
kraktus
b735547025
rustdoc-json-types Discriminant
: fix typo
...
"when to complex" should obviously be "too complex"
2024-08-09 20:50:00 +02:00
Alona Enraght-Moony
73ac5e0c6e
rustdoc: Remove OpaqueTy
2024-08-01 15:57:45 +00:00
Matthias Krüger
47b76d8d93
Rollup merge of #127290 - its-the-shrimp:document_rustdoc_json_types, r=aDotInTheVoid
...
Fully document `rustdoc-json-types`
100% of `rustdoc-json-types` is now documented
Here's the summary from rustdoc with `-Zunstable-options --show-coverage`:
```
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| src/rustdoc-json-types/lib.rs | 314 | 100.0% | 23 | 31.9% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 314 | 100.0% | 23 | 31.9% |
+-------------------------------------+------------+------------+------------+------------+
```
2024-07-29 07:11:14 +02:00
schvv31n
c881f72807
fully document rustdoc-json-types
2024-07-29 00:54:43 +01: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
Michael Goulet
bd135e487f
Add rustdoc-json support for use<>
2024-07-12 05:24:51 -04:00
Alona Enraght-Moony
7e8aac553e
rustdoc-json: Better representation of lifetime bounds in where clauses.
...
As suggested [on zulip][1], there's no need to use `GenericBound` here,
as the only bound a lifetime can have is that it outlives other
lifetimes.
While we're making breaking changes here, I also renamed it from using
"region" to "lifetime", as this is more user-aligned. See [this
comment][2] for details.
[1]: https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/.60ItemEnum.3A.3AOpaqueTy.60/near/448871430
[2]: https://github.com/rust-lang/rust/issues/100961#issuecomment-2206565556
2024-07-03 20:00:56 +00:00
Boxy
432c11feb6
Remove Type
from rustdoc Const
2024-06-05 22:25:42 +01:00
Matthias Krüger
1f055cdb6e
Rollup merge of #125130 - aDotInTheVoid:id-docs, r=GuillaumeGomez
...
rustdoc-json-types: Document `Id`
Inspired by finding [someone looking into the internals of an id](https://github.com/rust-lang/rust/issues/91609#issuecomment-2110994540 ), I realized we only document the fact that these are opaque on [the rfc](https://rust-lang.github.io/rfcs/2963-rustdoc-json.html#id ).
r? `@GuillaumeGomez`
2024-05-16 16:22:45 +02:00
Alona Enraght-Moony
504bca9ee6
rustdoc-json-types: Document Id
2024-05-16 12:52:46 +00:00
whosehang
65d7c1d2d6
chore: fix some typos in comments
...
Signed-off-by: whosehang <whosehang@outlook.com>
2024-04-24 13:58:51 +08:00
Oli Scherer
18ff131c4e
Normalize layout test to protect against android alignment differences
2024-04-08 12:06:28 +00:00
Oli Scherer
84acfe86de
Actually create ranged int types in the type system.
2024-04-08 12:02:19 +00:00
Oli Scherer
c4efc25bfa
Thread pattern types through the HIR
2024-04-08 12:00:07 +00:00
Guillaume Gomez
c29f763153
Add is_object_safe
information for traits in JSON output
2023-12-23 11:43:31 +01:00
Noah Lev
c90a5b2019
rustdoc-json: Rename typedef to type alias
2023-08-21 14:02:34 -07:00
Luca Palmieri
cd7688bd30
Verify that ItemEnum
can be serialized and then deserialized using bincode
2023-05-22 18:26:20 +01:00
Luca Palmieri
a5e5101375
Serialize all enums as externally tagged to guarantee compatibility with binary formats such as bincode or postcard
2023-05-22 18:22:08 +01:00
León Orell Valerian Liehr
61e1eda6db
IAT: Rustdoc integration
2023-05-04 16:59:11 +02:00
DaniPopes
f470c29936
Fix remaining typos
2023-04-10 21:02:49 +02:00
ozkanonur
52c71e6e28
fix inconsistent json outputs from rustdoc
...
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-03-05 00:09:09 +03:00
Nixon Enraght-Moony
cca5d219e6
Rustdoc-Json: Report discriminant on all kinds of enum variant.
...
Closes #106299
2023-01-01 19:48:26 +00:00
Matthias Krüger
091f5e1a6c
Rollup merge of #103065 - aDotInTheVoid:rdj-arg-pattern, r=GuillaumeGomez
...
rustdoc-json: Document and Test that args can be patterns.
2022-11-30 19:53:17 +01:00
Martin Nordholts
30b7e44a3c
rustdoc JSON: Clarify that Function
is also used for methods
2022-11-20 13:48:49 +01: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
Nixon Enraght-Moony
064ad83cc3
rustdoc-json-types: Improve ItemSummary::path docs
2022-10-28 10:25:48 +01:00
Nixon Enraght-Moony
bb04e7e2a2
rustdoc-json: Document and Test that args can be patterns.
2022-10-14 19:57:01 +01:00
Nixon Enraght-Moony
aac7429c17
Rustdoc-Json: List impls for primitives
...
Closes #101695
2022-09-26 18:06:48 +01:00
Nixon Enraght-Moony
cb6c923cf4
Document that ResolvedPath can also be a union
2022-09-16 19:51:58 +01:00
Nixon Enraght-Moony
fdf7ec8694
Rustdoc-Json: Fix Type docs.
...
Primitive doesn't include Array/Slice/Tuple, as they are their own
variants.
ResolvedPath doesn't include Traits, as they appear in the DynTrait
variant.
2022-09-12 14:56:04 +01:00
Nixon Enraght-Moony
1c8de17323
Rustdoc-Json: More accurate struct type.
...
Closes #101489
2022-09-07 09:42:23 +01:00
Nixon Enraght-Moony
065e0b9c9c
Rustdoc-Json: Store Variant Fields as their own item.
...
Closes #100587
Closes #92945
2022-09-05 23:59:33 +01:00
Nixon Enraght-Moony
b76a012be1
Rustdoc-Json: Add enum discriminant
2022-09-03 22:15:26 +01:00
Michael Goulet
4989f6a724
Rollup merge of #100335 - aDotInTheVoid:rdj-resolved-path, r=GuillaumeGomez
...
Rustdoc-Json: Add `Path` type for traits.
Avoids using `Type` for trait fields, as a trait must always be a path, and not any other kind of type.
``@rustbot`` modify labels: +A-rustdoc-json +T-rustdoc
Closes #100106
2022-08-13 21:06:48 -07:00
Nixon Enraght-Moony
86bdb3ed09
Rustdoc-Json: Add Path
type for traits.
...
Closes #100106
2022-08-10 10:21:52 +01:00