Commit Graph

15 Commits

Author SHA1 Message Date
Rune Tynan 70c9b370e8
x.py fmt 2021-03-06 15:50:29 -05:00
Rune Tynan 83cece468e
Move tests to own file 2021-03-06 15:50:29 -05:00
Rune Tynan ca48d1566e
Add roundtrip testing and bump format version 2021-03-06 15:50:28 -05:00
Rune Tynan cf5246915b
Remove Item::kind, use tagged enum. Rename variants to match 2021-03-06 15:50:20 -05:00
Dylan DPC 641c3785dc
Rollup merge of #81891 - CraftSpider:fn-header, r=jyn514
[rustdoc-json] Make `header` a vec of modifiers, and FunctionPointer consistent

Bumps version number and adds tests, this is a breaking change. I can split this into two (`is_unsafe` -> `header` and `header: Vec<Modifiers>`) if desired.

Rationale: Modifiers are individual notes on a function, it makes more sense for them to be a list of an independent enum over a String which is inconsistently exposing the HIR representation (prefix_str vs custom literals).
Function pointers currently only support `unsafe`, but there has been talk on and off about allowing them to also support `const`, and this makes handling their modifiers consistent with handling those of a function, allowing better shared code.

`@rustbot` modify labels: +A-rustdoc-json +T-rustdoc
CC: `@HeroicKatora`
r? `@jyn514`
2021-02-14 16:54:45 +01:00
Rune Tynan be4ea06643
Modifiers -> Qualifiers 2021-02-12 23:24:09 -05:00
Rune Tynan 0a91daeaa3
Vec -> HashSet 2021-02-08 16:04:14 -05: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
Vadim Petrochenkov dbdbd30bf2 expand/resolve: Turn `#[derive]` into a regular macro attribute 2021-02-07 20:08:45 +03:00
Rune Tynan 30ecde0beb
Add abi field to `Method` 2021-02-05 22:25:11 -05:00
Rune Tynan 3106de5f2a
Remove struct_type from union output and bump format 2021-01-28 23:30:40 -05:00
Rune Tynan 3aa8456c88
Fix README typo 2021-01-28 11:15:43 -05:00
Rune Tynan 67b78a0271
Update crate name and add README 2021-01-27 18:58:44 -05:00
Rune Tynan 3076e255fe
`src/etc/json-types` -> `src/rustdoc-json-types` 2021-01-27 18:58:43 -05:00