Commit graph

25 commits

Author SHA1 Message Date
Nixon Enraght-Moony
d9e2d8d665 Rename span to source
Caused by
b0659f9b1b (diff-ede26372490522288745c5b3df2b6b2a1cc913dcd09b29af3a49935afe00c7e6L464-R464)
2021-03-24 19:44:23 +00:00
Nixon Enraght-Moony
9ba92972ed Don't call item on modules for json renderer
Closes #80664
2021-03-24 16:54:13 +00:00
Camelid
99ff2767bf Update tests
These tests were added to master after I made my changes.
2021-03-21 19:48:51 -07:00
Camelid
b0659f9b1b rustdoc-json: Rename Import.span to Import.source
* It is called `source` in rustc and the rest of rustdoc
* It is not a span, rather it is the source of the import
2021-03-21 19:47:12 -07:00
Yuki Okushi
a98dc9b3e7
Rollup merge of #82571 - aDotInTheVoid:reexport-tests, r=CraftSpider
Rustdoc Json: Add tests for Reexports, and improve jsondocck

The two changes are orthognal, so you can land just one if you want, but the improved errors realy helped write the tests.

Notably does not have the case from #80664, but I want to have all the ajacent cases tested before starting work on that to ensure I dont break anything.

Improves #81359

cc ```@CraftSpider```

r? ```@jyn514```

```@rustbot``` modify labels: +A-testsuite +T-rustdoc +A-rustdoc-json
2021-03-12 08:55:13 +09:00
Nixon Enraght-Moony
9925ecb392 Add reexport tests 2021-03-10 22:06:05 +00:00
Joshua Nelson
be069a687a Remove krate.version; fix crate_version in JSON
Previously, `JsonRenderer::after_krate` called `krate.version.clone()`.
The problem was it did that after the version was already moved into the
cache, so it would always be None. The fix was to get the version from
the cache instead.
2021-03-01 00:30:40 -05:00
Nixon Enraght-Moony
dd4b938c7f Implement using @set values 2021-02-20 01:50:12 +00:00
Nixon Enraght-Moony
cd5f603c31 Implement @set 2021-02-20 01:25:09 +00:00
Nixon Enraght-Moony
a00eb7ee1d Add @is command to jsondocck 2021-02-20 00:43:02 +00:00
Rune Tynan
ce02b7f7a6
Add comment + move derive helper 2021-02-08 15:45:50 -05:00
Rune Tynan
a26fa74d3c
Make header a vec of modifiers, make FunctionPointer consistent with Function and Method. 2021-02-08 14:00:30 -05:00
Rune Tynan
30ecde0beb
Add abi field to Method 2021-02-05 22:25:11 -05:00
Mara Bos
e98e42b881
Rollup merge of #81500 - CraftSpider:union-kind, r=jyn514
Remove struct_type from union output

Also bumps the format number and adds a test

Rationale: It's illegal to have unions of the form `union Union(i32, f32);`, or `union Union;`. The struct_type field was recently removed from the rustdoc Union AST, at which time this field was changed to always just read "union". It makes sense to completely remove it, as it provides no information.
2021-02-05 12:25:59 +01:00
Rune Tynan
3106de5f2a
Remove struct_type from union output and bump format 2021-01-28 23:30:40 -05:00
Rune Tynan
1c60d27a52
Remove leading newline 2021-01-28 23:24:13 -05:00
Rune Tynan
a2f5c72a2d
Fix has_body for trait methods 2021-01-28 23:24:12 -05:00
Rune Tynan
728ffc8c03
Address review v2 2021-01-19 17:02:34 -05:00
Rune Tynan
7715656edd
Add jsondocck tool, and use it for rustdoc JSON 2021-01-19 14:24:25 -05:00
Rune Tynan
31b17f513b
Add warning to compare.py about error messages 2021-01-15 12:50:05 -05:00
Rune Tynan
e42c1b9c2a
Fix JSON test 2021-01-15 12:50:04 -05:00
Nixon Enraght-Moony
c254a15906 Use true ID for def_id. 2020-12-05 22:38:57 +00:00
Nixon Enraght-Moony
d619271f2b Normalize windows path seperators. 2020-12-02 21:24:42 +00:00
Nixon Enraght-Moony
40b5470b0d Address review comments.
Go back to CRATE_DEF_INDEX

Minor niceness improvements

Don't output hidden items

Remove striped items from fields

Add $TEST_BASE_DIR

Small catch
2020-12-01 18:34:39 +00:00
Nixon Enraght-Moony
1098cce27a Add tests for rustdoc json
Move rustdoc/rustdoc-json to rustdoc-json

Scaffold rustdoc-json test mode

Implement run_rustdoc_json_test

Fix up python

Make tidy happy
2020-12-01 18:34:39 +00:00