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
Matthias Krüger
0dc39c7bd9
Rollup merge of #99479 - Enselic:import-can-be-without-id, r=camelid
...
rustdoc-json: Remove doc FIXME for Import::id and explain
Also add some test and refactor related code a bit.
``@rustbot`` labels +A-rustdoc-json +T-rustdoc
2022-08-10 00:00:24 +02:00
Nixon Enraght-Moony
a856e57f6c
Rustdoc-Json: Document HRTB's on DynTrait
...
Closes #99118
2022-08-03 14:17:26 +01:00
Martin Nordholts
1b6f6296e9
rustdoc-json: Remove doc FIXME for Import::id and explain
2022-07-19 22:43:39 +02:00
Guillaume Gomez
1a15c7147f
Fix rustdoc JSON inline
2022-07-16 13:39:38 +02:00
Nixon Enraght-Moony
18aea4594b
rustdoc-json-types: Clean up derives.
...
Closes #96189
Closes #96189
Everything is `Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize`
except `Crate` and `Item` which arn't `Hash`, as they have `HashMap`'s.
See linked issue for reasoning.
2022-07-02 00:11:29 +01:00
Martin Nordholts
1f15ce5f97
rustdoc-json: Fix HRTBs for WherePredicate::BoundPredicate
2022-05-04 21:03:01 +02:00
Martin Nordholts
b712135575
rustdoc-json-types: Improve docs for HRTB fields
2022-05-04 21:03:01 +02:00
Nixon Enraght-Moony
a5c0b1470c
rustdoc-json-types: implementors -> implementations
...
Closes #94198
2022-03-14 00:05:11 +00:00
Nixon Enraght-Moony
b526d8f27c
rustdoc-json-types: ty -> type_
...
Fixes #94889
2022-03-13 23:13:57 +00:00
Martin Nordholts
aa763fcf42
rustdoc-json: Include GenericParamDefKind::Type::synthetic in JSON
...
The rustdoc JSON for
```
pub fn f(_: impl Clone) {}
```
will effectively be
```
pub fn f<impl Clone: Clone>(_: impl Clone)
```
where a synthetic generic parameter called `impl Clone` with generic
trait bound `Clone` is added to the function declaration.
The generated HTML filters out these generic parameters by doing
`self.params.iter().filter(|p| !p.is_synthetic_type_param())`, because
the synthetic generic parameter is not of interest to regular users.
For the same reason, we should expose whether or not a generic parameter
is synthetic or not also in the rustdoc JSON, so that rustdoc JSON
clients can also have the option to hide synthetic generic parameters.
2022-03-04 05:54:12 +01:00
Michael Goulet
aefc0a223a
make generic projection types print correctly
2022-03-03 13:01:35 -08:00
Michael Goulet
ca6e06efba
make GATs print properly in traits
2022-02-27 21:36:29 -08:00
Nixon Enraght-Moony
aa601574a5
rustdoc-json: Better Header Type
...
- Make ABI an enum, instead of being stringly typed
- Replace Qualifier HashSet with 3 bools
- Merge ABI field into header, as they always occor together
2022-02-18 23:31:33 +00:00
Loïc BRANSTETT
1521b53c53
Increase the format version of rustdoc-json-types
2022-01-20 22:14:02 +01:00
kadmin
e7529d6a38
Update term for use in more places
...
Replace use of `ty()` on term and use it in more places. This will allow more flexibility in the
future, but slightly worried it allows items which are consts which only accept types.
2022-01-17 19:59:40 +00:00
Yuval Dolev
43f4ef5c6a
Moved format-version constant to rustdoc-json-types
2021-10-15 12:27:42 +03:00
Loïc BRANSTETT
4891aaf2e9
Remove special-casing of never primitive in rustdoc-json-types
2021-10-08 16:53:39 +02:00
Hirochika Matsumoto
e18a8efb8b
Don't ignore impls for primitive types
2021-09-29 23:57:01 +09:00
Mark Rousskov
c746be2219
Migrate to 2021
2021-09-20 22:21:42 -04:00
Noah Lev
2a60229490
rustdoc: Clean up handling of lifetime bounds
...
Previously, rustdoc recorded lifetime bounds by rendering them into the
name of the lifetime parameter. Now, it leaves the name as the actual
name and instead records lifetime bounds in an `outlives` list, similar
to how type parameter bounds are recorded.
2021-09-02 14:27:59 -07:00