Commit Graph

47 Commits

Author SHA1 Message Date
Michael Goulet
c085071631 Remove unadorned 2024-10-11 11:30:08 -04:00
Alona Enraght-Moony
8a9b67028c rustdoc-json: Add tests for unsafe/safe extern blocks (RFC 3484) 2024-10-10 20:53:57 +00:00
Michael Goulet
c682aa162b Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
schvv31n
f2696ab4d3 rustdoc: normalise type/field names in rustdoc-json-types/jsondoclint 2024-09-01 23:58:08 +03:00
Matthias Krüger
defc245d06
Rollup merge of #129123 - aDotInTheVoid:rustdoc-json-self, r=fmease
rustdoc-json: Add test for `Self` type

Inspired by #128471, the rustdoc-json suite had no tests in place for the `Self` type. This PR adds one.

I've also manually checked locally that this test passes on 29e924841f, confirming that adding `clean::Type::SelfTy` didn't change the JSON output. (potentially adding a self type to json (insead of (ab)using generic) is tracked in #128522)

Updates #81359

r? ````````@fmease````````
2024-08-31 10:08:52 +02:00
Michael Goulet
eae5b5c6e7 Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
Alona Enraght-Moony
6ed283bb34 rustdoc-json: Add test for Self type 2024-08-15 13:07:23 +00:00
Matthias Krüger
8789b95b67
Rollup merge of #128836 - its-the-shrimp:add_test_for_107278, r=aDotInTheVoid
rustdoc-json: add a test for impls on private & hidden types

Fixes #107278 (or rather just ensures it won't resurface)
r? ``@aDotInTheVoid``
2024-08-09 00:03:38 +02:00
schvv31n
1bf30eb5aa rustdoc-json: added a test for #107278 2024-08-08 17:55:52 +01:00
schvv31n
c2a0d9ca6e rustdoc: fixed #101105
modules are now stripped based on the same logic that's used to strip other item kinds
2024-08-08 17:13:15 +01: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
52a49d94c7 rustdoc: Add test for impl_trait_in_accos_type 2024-08-01 15:48:22 +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
León Orell Valerian Liehr
633f41de09
Update all rustdoc-json/ tests to use the new style 2024-07-19 16:54:42 +02:00
Michael Goulet
bd135e487f Add rustdoc-json support for use<> 2024-07-12 05:24:51 -04:00
schvv31n
8e7314f6e0 rustdoc-json: add trait/type alias tests 2024-07-07 15:02:30 +01: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
Nicholas Nethercote
9f16362ab4 rustfmt tests/rustdoc-json/. 2024-06-04 14:15:19 +10:00
Alona Enraght-Moony
3ee84983f1 rustdoc-json: Add test for keywords with --document-private-items 2024-05-24 16:40:20 +00:00
许杰友 Jieyou Xu (Joe)
6e48b96692
[AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
Guillaume Gomez
431ac40a93 Add regression test for is_object_safe field on traits 2023-12-23 19:00:17 +01:00
Alona Enraght-Moony
22e1576a12 rustdoc-json: Fix test so it actuall checks things
After #111427, no item has a `kind` field, so these assertions could never
fail. Instead, assert that those two items arn't present.
2023-11-09 12:13:16 +00:00
Guillaume Gomez
9d3c80248b
Rollup merge of #117713 - GuillaumeGomez:document-hidden-json, r=notriddle
Add test for reexported hidden item with `--document-hidden-items`

Coming from [this discussion on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Using.20cargo-semver-checks.20in.20rustdoc.20JSON.20tests.3A.20revisited).

cc ``@aDotInTheVoid``
r? ``@notriddle``
2023-11-08 17:14:37 +01:00
Guillaume Gomez
33edea60f0 Add test for reexported hidden item with --document-hidden-items 2023-11-08 15:44:58 +01:00
Alona Enraght-Moony
434b69a1d6 tests/rustdoc-json: Rewrite tests no not use #![no_core]. 2023-11-07 16:56:03 +00:00
Alona Enraght-Moony
0875f456f1 tests/rustdoc-json: Remove more needless uses of #![no_core].
These were'nt done with regex, but don't require changes to assertions.
2023-11-07 16:40:32 +00:00
Alona Enraght-Moony
f784fa7bd9 tests/rustdoc-json: Remove some needless uses of #![no_core].
Done by removing all uses of `#![no_core]`, and the reverting the ones
that failed. More involved ones are in a later commit.
2023-11-07 16:36:55 +00:00
Oli Scherer
4512f211ae Accept less invalid Rust in rustdoc 2023-10-31 13:58:03 +00:00
Noah Lev
912d11d4d1 Fix rustdoc-json tests 2023-08-23 11:52:49 -07:00
Alona Enraght-Moony
31ddea6e98 rustdoc-json: Add tests for field/variant ordering. 2023-08-09 00:32:03 +00:00
León Orell Valerian Liehr
6f5d8556ca
Handle inherent associated types fallout 2023-08-03 02:18:52 +02:00
bors
ec362f0ae8 Auto merge of #113574 - GuillaumeGomez:rustdoc-json-strip-hidden-impl, r=aDotInTheVoid,notriddle
Strip impl if not re-exported and is doc(hidden)

Part of #112852.

r? `@aDotInTheVoid`
2023-07-18 02:47:03 +00:00
Guillaume Gomez
c132cdbe5f Improve issue-112852 tests 2023-07-17 23:36:47 +02:00
Guillaume Gomez
2861a56178 Add more tests for not-reexported impl 2023-07-14 17:25:09 +02:00
Guillaume Gomez
449cc6549f Add regression test for #112852 2023-07-14 16:45:54 +02:00
Alona Enraght-Moony
04dbc7da40 rustdoc-json: Add test for private supertrait. 2023-07-14 06:54:40 +00: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
Alona Enraght-Moony
99cae9c4c1 rustdoc-json: Add tests for visibility of impls 2023-05-15 17:48:48 +00:00
Alona Enraght-Moony
c271c708e2 rustdoc-json: Add tests for #![feature(inherent_associated_types)] 2023-05-13 13:07:23 +00:00
Gary Guo
de492a3894 Update tests 2023-04-29 13:01:46 +01:00
Alona Enraght-Moony
e3de409aaa Move test from rustdoc-ui to rustdoc-json 2023-04-14 18:19:49 +00:00
Guillaume Gomez
3ef8d2d607 Update tests for rustc_doc_primitive 2023-03-30 22:56:52 +02:00
Michael Goulet
be9fd75d32 rustdoc + rustdoc-json support for non_lifetime_binders 2023-03-28 16:50:49 +00:00
Alona Enraght-Moony
26cae277c5 Add test for c_variadic in rustdoc-json 2023-03-18 17:59:29 +00:00
Guillaume Gomez
7d47d7cbaa Add regression test for #107677 2023-02-18 18:28:17 +01:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00