diff options
| author | bors <bors@rust-lang.org> | 2022-03-04 00:27:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-04 00:27:23 +0000 |
| commit | 6d7684101a51f1c375ec84aef5d2fbdeb214bbc2 (patch) | |
| tree | d86722eb5dda8ae7ef9980dd4a19deebb9f37cf4 /src/rustdoc-json-types | |
| parent | 40d3040ae19b8c43c0027bc6d3e9805e5ee5e0ee (diff) | |
| parent | 0e57a16c88cbb042bf4d19934e0ccdd3838645ec (diff) | |
| download | rust-6d7684101a51f1c375ec84aef5d2fbdeb214bbc2.tar.gz rust-6d7684101a51f1c375ec84aef5d2fbdeb214bbc2.zip | |
Auto merge of #94009 - compiler-errors:gat-rustdoc, r=GuillaumeGomez
Support GATs in Rustdoc Implements: 1. Rendering GATs in trait definitions and impl blocks 2. Rendering GATs in types (e.g. in the return type of a function) Fixes #92341 This is my first rustdoc PR, so I have absolutely no idea how to produce tests for this. Advice from the rustdoc team would be wonderful! I tested locally and things looked correct: 
Diffstat (limited to 'src/rustdoc-json-types')
| -rw-r--r-- | src/rustdoc-json-types/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index be9bbc7391d..40b0de44829 100644 --- a/src/rustdoc-json-types/lib.rs +++ b/src/rustdoc-json-types/lib.rs @@ -9,7 +9,7 @@ use std::path::PathBuf; use serde::{Deserialize, Serialize}; /// rustdoc format-version. -pub const FORMAT_VERSION: u32 = 11; +pub const FORMAT_VERSION: u32 = 12; /// A `Crate` is the root of the emitted JSON blob. It contains all type/documentation information /// about the language items in the local crate, as well as info about external items to allow @@ -145,6 +145,7 @@ pub struct Constant { #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] pub struct TypeBinding { pub name: String, + pub args: GenericArgs, pub binding: TypeBindingKind, } @@ -233,6 +234,7 @@ pub enum ItemEnum { default: Option<String>, }, AssocType { + generics: Generics, bounds: Vec<GenericBound>, /// e.g. `type X = usize;` default: Option<Type>, @@ -432,6 +434,7 @@ pub enum Type { /// `<Type as Trait>::Name` or associated types like `T::Item` where `T: Iterator` QualifiedPath { name: String, + args: Box<GenericArgs>, self_type: Box<Type>, #[serde(rename = "trait")] trait_: Box<Type>, |
