about summary refs log tree commit diff
path: root/src/test/rustdoc-json
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-2125/+0
2023-01-06rustdoc: Strip imports of items which are `#[doc(hidden)]`Nixon Enraght-Moony-1/+17
Closes #106379
2023-01-04Rollup merge of #106412 - ↵Matthias Krüger-0/+21
GuillaumeGomez:fix-links-to-primitive-rustdoc-json, r=aDotInTheVoid Fix link generation for local primitive types in rustdoc JSON output Fixes https://github.com/rust-lang/rust/issues/104064. As mentioned in the issue, I'm not super happy about this fix which is more a hack rather than a sound-proof solution. However I couldn't find a better way to fix it. r? `@aDotInTheVoid`
2023-01-03Add regression test for #104064Guillaume Gomez-0/+21
2023-01-01Rustdoc-Json: Report discriminant on all kinds of enum variant.Nixon Enraght-Moony-116/+130
Closes #106299
2022-12-02Add test for #105022Nixon Enraght-Moony-0/+12
2022-12-02Add test for #105025Nixon Enraght-Moony-0/+21
2022-12-02Rustdoc-Json: Don't include foreign traitsNixon Enraght-Moony-9/+2
2022-11-30Rollup merge of #105063 - aDotInTheVoid:rdj-dont-assume-core, r=notriddleMatthias Krüger-1/+6
Rustdoc Json Tests: Don't assume that core::fmt::Debug will always have one item. See https://github.com/rust-lang/rust/pull/104525#issuecomment-1330837047 and https://github.com/rust-lang/rust/pull/104525#issuecomment-1331087852 for motivation. This still assumes that `fmt` is the first method, but thats alot less brittle than assuming it will be the only method. Sadly, we can't use a aux crate to insulate the tests from core changes, because core is special, so all we can do is try not to depend on things that may change.
2022-11-30Rollup merge of #103065 - aDotInTheVoid:rdj-arg-pattern, r=GuillaumeGomezMatthias Krüger-0/+7
rustdoc-json: Document and Test that args can be patterns.
2022-11-29Don't assume that core::fmt::Debug will always have one item.Nixon Enraght-Moony-1/+6
2022-11-28Rustdoc-Json: Add tests for linking to foreign variants.Nixon Enraght-Moony-0/+25
2022-11-26Rollup merge of #104943 - aDotInTheVoid:jsondoclint-use-enum, r=GuillaumeGomezGuillaume Gomez-0/+33
jsondoclint: Handle using enum variants and glob using enums. More work on jsondoclint for `core.json` Closes #104942 r? `@GuillaumeGomez` `@rustbot` modify labels: +A-testsuite
2022-11-26jsondoclint: Handle using enum variants and glob using enums.Nixon Enraght-Moony-0/+33
Closes #104942
2022-11-26jsondoclint: Accept trait alias is places where trait expected.Nixon Enraght-Moony-0/+30
Closes #104923
2022-11-25jsondoclint: Recognise Typedef as valid kind for Type::ResolvedPathNixon Enraght-Moony-0/+10
Closes #104851
2022-11-16rustdoc JSON: Use `Function` everywhere and remove `Method`Martin Nordholts-1/+1
2022-10-29Add regression test for missing item from private mod in JSON outputGuillaume Gomez-0/+28
2022-10-14rustdoc-json: Document and Test that args can be patterns.Nixon Enraght-Moony-0/+7
2022-09-26 Rustdoc-Json: List impls for primitivesNixon Enraght-Moony-1/+35
Closes #101695
2022-09-16Document that ResolvedPath can also be a unionNixon Enraght-Moony-0/+8
2022-09-14Rustdoc-Json: Add test for extern_typesNixon Enraght-Moony-0/+10
2022-09-13Rollup merge of #101770 - aDotInTheVoid:rdj-index-clone, r=GuillaumeGomezMatthias Krüger-0/+7
Rustdoc-Json: Don't loose subitems of foreign traits. Previously, we'd clone the index, and extend it with foreign traits. But when doing this, traits would render their subitems without them going into the index being used in the output leading to dangling ID's. r? `@GuillaumeGomez`
2022-09-13Rustdoc-Json: Don't loose subitems of foreign traits.Nixon Enraght-Moony-0/+7
2022-09-13Auto merge of #96709 - jackh726:gats-stabilization, r=compiler-errorsbors-1/+1
Stabilize generic associated types Closes #44265 r? `@nikomatsakis` # ⚡ Status of the discussion ⚡ * [x] There have been several serious concerns raised, [summarized here](https://github.com/rust-lang/rust/pull/96709#issuecomment-1129311660). * [x] There has also been a [deep-dive comment](https://github.com/rust-lang/rust/pull/96709#issuecomment-1167220240) explaining some of the "patterns of code" that are enabled by GATs, based on use-cases posted to this thread or on the tracking issue. * [x] We have modeled some aspects of GATs in [a-mir-formality](https://github.com/nikomatsakis/a-mir-formality) to give better confidence in how they will be resolved in the future. [You can read a write-up here](https://github.com/rust-lang/types-team/blob/master/minutes/2022-07-08-implied-bounds-and-wf-checking.md). * [x] The major points of the discussion have been [summarized on the GAT initiative repository](https://rust-lang.github.io/generic-associated-types-initiative/mvp.html). * [x] [FCP has been proposed](https://github.com/rust-lang/rust/pull/96709#issuecomment-1129311660) and we are awaiting final decisions and discussion amidst the relevant team members. # Stabilization proposal This PR proposes the stabilization of `#![feature(generic_associated_types)]`. While there a number of future additions to be made and bugs to be fixed (both discussed below), properly doing these will require significant language design and will ultimately likely be backwards-compatible. Given the overwhelming desire to have some form of generic associated types (GATs) available on stable and the stability of the "simple" uses, stabilizing the current subset of GAT features is almost certainly the correct next step. Tracking issue: #44265 Initiative: https://rust-lang.github.io/generic-associated-types-initiative/ RFC: https://github.com/rust-lang/rfcs/blob/master/text/1598-generic_associated_types.md Version: 1.65 (2022-08-22 => beta, 2022-11-03 => stable). ## Motivation There are a myriad of potential use cases for GATs. Stabilization unblocks probable future language features (e.g. async functions in traits), potential future standard library features (e.g. a `LendingIterator` or some form of `Iterator` with a lifetime generic), and a plethora of user use cases (some of which can be seen just by scrolling through the tracking issue and looking at all the issues linking to it). There are a myriad of potential use cases for GATs. First, there are many users that have chosen to not use GATs primarily because they are not stable (some of which can be seen just by scrolling through the tracking issue and looking at all the issues linking to it). Second, while language feature desugaring isn't *blocked* on stabilization, it gives more confidence on using the feature. Likewise, library features like `LendingIterator` are not necessarily blocked on stabilization to be implemented unstably; however few, if any, public-facing APIs actually use unstable features. This feature has a long history of design, discussion, and developement - the RFC was first introduced roughly 6 years ago. While there are still a number of features left to implement and bugs left to fix, it's clear that it's unlikely those will have backwards-incompatibility concerns. Additionally, the bugs that do exist do not strongly impede the most-common use cases. ## What is stabilized The primary language feature stabilized here is the ability to have generics on associated types, as so. Additionally, where clauses on associated types will now be accepted, regardless if the associated type is generic or not. ```rust trait ATraitWithGATs { type Assoc<'a, T> where T: 'a; } trait ATraitWithoutGATs<'a, T> { type Assoc where T: 'a; } ``` When adding an impl for a trait with generic associated types, the generics for the associated type are copied as well. Note that where clauses are allowed both after the specified type and before the equals sign; however, the latter is a warn-by-default deprecation. ```rust struct X; struct Y; impl ATraitWithGATs for X { type Assoc<'a, T> = &'a T where T: 'a; } impl ATraitWithGATs for Y { type Assoc<'a, T> where T: 'a = &'a T; } ``` To use a GAT in a function, generics are specified on the associated type, as if it was a struct or enum. GATs can also be specified in trait bounds: ```rust fn accepts_gat<'a, T>(t: &'a T) -> T::Assoc<'a, T> where for<'x> T: ATraitWithGATs<Assoc<'a, T> = &'a T> { ... } ``` GATs can also appear in trait methods. However, depending on how they are used, they may confer where clauses on the associated type definition. More information can be found [here](https://github.com/rust-lang/rust/issues/87479). Briefly, where clauses are required when those bounds can be proven in the methods that *construct* the GAT or other associated types that use the GAT in the trait. This allows impls to have maximum flexibility in the types defined for the associated type. To take a relatively simple example: ```rust trait Iterable { type Item<'a>; type Iterator<'a>: Iterator<Item = Self::Item<'a>>; fn iter<'x>(&'x self) -> Self::Iterator<'x>; //^ We know that `Self: 'a` for `Iterator<'a>`, so we require that bound on `Iterator` // `Iterator` uses `Self::Item`, so we also require a `Self: 'a` on `Item` too } ``` A couple well-explained examples are available in a previous [blog post](https://blog.rust-lang.org/2021/08/03/GATs-stabilization-push.html). ## What isn't stabilized/implemented ### Universal type/const quantification Currently, you can write a bound like `X: for<'a> Trait<Assoc<'a> = &'a ()>`. However, you cannot currently write `for<T> X: Trait<Assoc<T> = T>` or `for<const N> X: Trait<Assoc<N> = [usize; N]>`. Here is an example where this is needed: ```rust trait Foo {} trait Trait { type Assoc<F: Foo>; } trait Trait2: Sized { fn foo<F: Foo, T: Trait<Assoc<F> = F>>(_t: T); } ``` In the above example, the *caller* must specify `F`, which is likely not what is desired. ### Object-safe GATs Unlike non-generic associated types, traits with GATs are not currently object-safe. In other words the following are not allowed: ```rust trait Trait { type Assoc<'a>; } fn foo(t: &dyn for<'a> Trait<Assoc<'a> = &'a ()>) {} //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not allowed let ty: Box<dyn for<'a> Trait<Assoc<'a> = &'a ()>>; //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not allowed ``` ### Higher-kinded types You cannot write currently (and there are no current plans to implement this): ```rust struct Struct<'a> {} fn foo(s: for<'a> Struct<'a>) {} ``` ## Tests There are many tests covering GATs that can be found in `src/test/ui/generic-associated-types`. Here, I'll list (in alphanumeric order) tests highlight some important behavior or contain important patterns. - `./parse/*`: Parsing of GATs in traits and impls, and the trait path with GATs - `./collections-project-default.rs`: Interaction with associated type defaults - `./collections.rs`: The `Collection` pattern - `./const-generics-gat-in-trait-return-type-*.rs`: Const parameters - `./constraint-assoc-type-suggestion.rs`: Emit correct syntax in suggestion - `./cross-crate-bounds.rs`: Ensure we handles bounds across crates the same - `./elided-in-expr-position.rs`: Disallow lifetime elision in return position - `./gat-in-trait-path-undeclared-lifetime.rs`: Ensure we error on undeclared lifetime in trait path - `./gat-in-trait-path.rs`: Base trait path case - `./gat-trait-path-generic-type-arg.rs`: Don't allow shadowing of parameters - `./gat-trait-path-parenthesised-args.rs`: Don't allow paranthesized args in trait path - `./generic-associated-types-where.rs`: Ensure that we require where clauses from trait to be met on impl - `./impl_bounds.rs`: Check that the bounds on GATs in an impl are checked - `./issue-76826.rs`: `Windows` pattern - `./issue-78113-lifetime-mismatch-dyn-trait-box.rs`: Implicit 'static diagnostics - `./issue-84931.rs`: Ensure that we have a where clause on GAT to ensure trait parameter lives long enough - `./issue-87258_a.rs`: Unconstrained opaque type with TAITs - `./issue-87429-2.rs`: Ensure we can use bound vars in the bounds - `./issue-87429-associated-type-default.rs`: Ensure bounds hold with associated type defaults, for both trait and impl - `./issue-87429-specialization.rs`: Check that bounds hold under specialization - `./issue-88595.rs`: Under the outlives lint, we require a bound for both trait and GAT lifetime when trait lifetime is used in function - `./issue-90014.rs`: Lifetime bounds are checked with TAITs - `./issue-91139.rs`: Under migrate mode, but not NLL, we don't capture implied bounds from HRTB lifetimes used in a function and GATs - `./issue-91762.rs`: We used to too eagerly pick param env candidates when normalizing with GATs. We now require explicit parameters specified. - `./issue-95305.rs`: Disallow lifetime elision in trait paths - `./iterable.rs`: `Iterable` pattern - `./method-unsatified-assoc-type-predicate.rs`: Print predicates with GATs correctly in method resolve error - `./missing_lifetime_const.rs`: Ensure we must specify lifetime args (not elidable) - `./missing-where-clause-on-trait.rs`: Ensure we don't allow stricter bounds on impl than trait - `./parameter_number_and_kind_impl.rs`: Ensure paramters on GAT in impl match GAT in trait - `./pointer_family.rs`: `PointerFamily` pattern - `./projection-bound-cycle.rs`: Don't allow invalid cycles to prove bounds - `./self-outlives-lint.rs`: Ensures that an e.g. `Self: 'a` is written on the traits GAT if that bound can be implied from the GAT usage in the trait - `./shadowing.rs`: Don't allow lifetime shadowing in params - `./streaming_iterator.rs`: `StreamingIterator`(`LendingIterator`) pattern - `./trait-objects.rs`: Disallow trait objects for traits with GATs - `./variance_constraints.rs`: Require that GAT substs be invariant ## Remaining bugs and open issues A full list of remaining open issues can be found at: https://github.com/rust-lang/rust/labels/F-generic_associated_types There are some `known-bug` tests in-tree at `src/test/ui/generic-associated-types/bugs`. Here I'll categorize most of those that GAT bugs (or involve a pattern found more with GATs), but not those that include GATs but not a GAT issue in and of itself. (I also won't include issues directly for things listed elsewhere here.) Using the concrete type of a GAT instead of the projection type can give errors, since lifetimes are chosen to be early-bound vs late-bound. - #85533 - #87803 In certain cases, we can run into cycle or overflow errors. This is more generally a problem with associated types. - #87755 - #87758 Bounds on an associatd type need to be proven by an impl, but where clauses need to be proven by the usage. This can lead to confusion when users write one when they mean the other. - #87831 - #90573 We sometimes can't normalize closure signatures fully. Really an asociated types issue, but might happen a bit more frequently with GATs, since more obvious place for HRTB lifetimes. - #88382 When calling a function, we assign types to parameters "too late", after we already try (and fail) to normalize projections. Another associated types issue that might pop up more with GATs. - #88460 - #96230 We don't fully have implied bounds for lifetimes appearing in GAT trait paths, which can lead to unconstrained type errors. - #88526 Suggestion for adding lifetime bounds can suggest unhelpful fixes (`T: 'a` instead of `Self: 'a`), but the next compiler error after making the suggested change is helpful. - #90816 - #92096 - #95268 We can end up requiring that `for<'a> I: 'a` when we really want `for<'a where I: 'a> I: 'a`. This can leave unhelpful errors than effectively can't be satisfied unless `I: 'static`. Requires bigger changes and not only GATs. - #91693 Unlike with non-generic associated types, we don't eagerly normalize with param env candidates. This is intended behavior (for now), to avoid accidentaly stabilizing picking arbitrary impls. - #91762 Some Iterator adapter patterns (namely `filter`) require Polonius or unsafe to work. - #92985 ## Potential Future work ### Universal type/const quantification No work has been done to implement this. There are also some questions around implied bounds. ### Object-safe GATs The intention is to make traits with GATs object-safe. There are some design work to be done around well-formedness rules and general implementation. ### GATified std lib types It would be helpful to either introduce new std lib traits (like `LendingIterator`) or to modify existing ones (adding a `'a` generic to `Iterator::Item`). There also a number of other candidates, like `Index`/`IndexMut` and `Fn`/`FnMut`/`FnOnce`. ### Reduce the need for `for<'a>` Seen [here](https://github.com/rust-lang/rfcs/pull/1598#issuecomment-2611378730). One possible syntax: ```rust trait Iterable { type Iter<'a>: Iterator<Item = Self::Item<'a>>; } fn foo<T>() where T: Iterable, T::Item<let 'a>: Display { } //note the `let`! ``` ### Better implied bounds on higher-ranked things Currently if we have a `type Item<'a> where self: 'a`, and a `for<'a> T: Iterator<Item<'a> = &'a ()`, this requires `for<'a> Self: 'a`. Really, we want `for<'a where T: 'a> ...` There was some mentions of this all the back in the RFC thread [here](https://github.com/rust-lang/rfcs/pull/1598#issuecomment-264340514). ## Alternatives ### Make generics on associated type in bounds a binder Imagine the bound `for<'a> T: Trait<Item<'a>= &'a ()>`. It might be that `for<'a>` is "too large" and it should instead be `T: Trait<for<'a> Item<'a>= &'a ()>`. Brought up in RFC thread [here](https://github.com/rust-lang/rfcs/pull/1598#issuecomment-229443863) and in a few places since. Another related question: Is `for<'a>` the right syntax? Maybe `where<'a>`? Also originally found in RFC thread [here](https://github.com/rust-lang/rfcs/pull/1598#issuecomment-261639969). ### Stabilize lifetime GATs first This has been brought up a few times. The idea is to only allow GATs with lifetime parameters to in initial stabilization. This was probably most useful prior to actual implementation. At this point, lifetimes, types, and consts are all implemented and work. It feels like an arbitrary split without strong reason. ## History * On 2016-04-30, [RFC opened](https://github.com/rust-lang/rfcs/pull/1598) * On 2017-09-02, RFC merged and [tracking issue opened](https://github.com/rust-lang/rust/issues/44265) * On 2017-10-23, [Move Generics from MethodSig to TraitItem and ImplItem](https://github.com/rust-lang/rust/pull/44766) * On 2017-12-01, [Generic Associated Types Parsing & Name Resolution](https://github.com/rust-lang/rust/pull/45904) * On 2017-12-15, [https://github.com/rust-lang/rust/pull/46706](https://github.com/rust-lang/rust/pull/46706) * On 2018-04-23, [Feature gate where clauses on associated types](https://github.com/rust-lang/rust/pull/49368) * On 2018-05-10, [Extend tests for RFC1598 (GAT)](https://github.com/rust-lang/rust/pull/49423) * On 2018-05-24, [Finish implementing GATs (Chalk)](https://github.com/rust-lang/chalk/pull/134) * On 2019-12-21, [Make GATs less ICE-prone](https://github.com/rust-lang/rust/pull/67160) * On 2020-02-13, [fix lifetime shadowing check in GATs](https://github.com/rust-lang/rust/pull/68938) * On 2020-06-20, [Projection bound validation](https://github.com/rust-lang/rust/pull/72788) * On 2020-10-06, [Separate projection bounds and predicates](https://github.com/rust-lang/rust/pull/73905) * On 2021-02-05, [Generic associated types in trait paths](https://github.com/rust-lang/rust/pull/79554) * On 2021-02-06, [Trait objects do not work with generic associated types](https://github.com/rust-lang/rust/issues/81823) * On 2021-04-28, [Make traits with GATs not object safe](https://github.com/rust-lang/rust/pull/84622) * On 2021-05-11, [Improve diagnostics for GATs](https://github.com/rust-lang/rust/pull/82272) * On 2021-07-16, [Make GATs no longer an incomplete feature](https://github.com/rust-lang/rust/pull/84623) * On 2021-07-16, [Replace associated item bound vars with placeholders when projecting](https://github.com/rust-lang/rust/pull/86993) * On 2021-07-26, [GATs: Decide whether to have defaults for `where Self: 'a`](https://github.com/rust-lang/rust/issues/87479) * On 2021-08-25, [Normalize projections under binders](https://github.com/rust-lang/rust/pull/85499) * On 2021-08-03, [The push for GATs stabilization](https://blog.rust-lang.org/2021/08/03/GATs-stabilization-push.html) * On 2021-08-12, [Detect stricter constraints on gats where clauses in impls vs trait](https://github.com/rust-lang/rust/pull/88336) * On 2021-09-20, [Proposal: Change syntax of where clauses on type aliases](https://github.com/rust-lang/rust/issues/89122) * On 2021-11-06, [Implementation of GATs outlives lint](https://github.com/rust-lang/rust/pull/89970) * On 2021-12-29. [Parse and suggest moving where clauses after equals for type aliases](https://github.com/rust-lang/rust/pull/92118) * On 2022-01-15, [Ignore static lifetimes for GATs outlives lint](https://github.com/rust-lang/rust/pull/92865) * On 2022-02-08, [Don't constrain projection predicates with inference vars in GAT substs](https://github.com/rust-lang/rust/pull/92917) * On 2022-02-15, [Rework GAT where clause check](https://github.com/rust-lang/rust/pull/93820) * On 2022-02-19, [Only mark projection as ambiguous if GAT substs are constrained](https://github.com/rust-lang/rust/pull/93892) * On 2022-03-03, [Support GATs in Rustdoc](https://github.com/rust-lang/rust/pull/94009) * On 2022-03-06, [Change location of where clause on GATs](https://github.com/rust-lang/rust/pull/90076) * On 2022-05-04, [A shiny future with GATs blog post](https://jackh726.github.io/rust/2022/05/04/a-shiny-future-with-gats.html) * On 2022-05-04, [Stabilization PR](https://github.com/rust-lang/rust/pull/96709)
2022-09-11Rustdoc-Json: Add tests for trait impls.Nixon Enraght-Moony-0/+81
2022-09-10Rollup merge of #101634 - aDotInTheVoid:rdj-test, r=CraftSpiderMatthias Krüger-55/+61
Rustdoc-Json Tests: Use `@is` and `@ismany` more often.
2022-09-10Rustdoc-Json Tests: Use `@is` and `@ismany` more often.Nixon Enraght-Moony-55/+61
2022-09-10Rustdoc-Json: Correcty handle intra-doc-links to items without HTML pageNixon Enraght-Moony-0/+42
Closes #101531
2022-09-07Rustdoc-Json: More accurate struct type.Nixon Enraght-Moony-28/+71
Closes #101489
2022-09-05Rustdoc-Json: Store Variant Fields as their own item.Nixon Enraght-Moony-1/+149
Closes #100587 Closes #92945
2022-09-03Rustdoc-Json: Add enum discriminantNixon Enraght-Moony-0/+119
2022-08-30Stabilize GATsJack Huey-1/+1
2022-08-30rustdoc: Resugar async fn return type in `clean`, not `html`Nixon Enraght-Moony-0/+36
This way it also happens for json output. Fixes #101199
2022-08-29Rustdoc-Json: Retain Stripped Modules when they are imported, not when they ↵Nixon Enraght-Moony-10/+56
have items. Fixes #101103 Fixes #100973
2022-08-18Update rustdoc-json test filesGuillaume Gomez-567/+552
2022-08-17Rollup merge of #99474 - aDotInTheVoid:rustdoc-json-noinline-test-cleanup, ↵Matthias Krüger-39/+69
r=CraftSpider Rustdoc json tests: New @hasexact test command Alot of the time, we wanted to assert that a module had an exact set of items. Most of the time this was done by asserting that the ```@count``` of the module was `n`, and then doing `n` ```@has``` checks on the module. This was tedious, so often shortcuts were done. This PR adds a new command to jsondocck to allow consistently expressing this behavior, and then uses it to clean up the tests. ``@rustbot`` modify labels: +A-rustdoc-json +A-testsuite
2022-08-17Rollup merge of #100630 - Enselic:export_extern_crate_as_self, r=GuillaumeGomezTakayuki Maeda-0/+11
rustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>` Closes #100531 r? `@GuillaumeGomez` `@rustbot` labels +A-rustdoc-json +T-rustdoc
2022-08-16rustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>`Martin Nordholts-0/+11
2022-08-15Rollup merge of #100582 - GuillaumeGomez:rustdoc-json-stripped-enum-variant, ↵Matthias Krüger-0/+13
r=notriddle [rustdoc] Fix handling of stripped enum variant in JSON output format Fixes https://github.com/rust-lang/rust/issues/100529. cc ``@aDotInTheVoid`` ``@Enselic`` r? ``@notriddle``
2022-08-15Rollup merge of #100325 - aDotInTheVoid:rdj-import-impl, r=GuillaumeGomezMatthias Krüger-0/+24
Rustdoc-Json: Don't remove impls for items imported from private modules After #99287, items in private modules may still be in the json output, if a public import accesses them. To reflect this, items that are imported need to be marked as retained in the `Stripper` pass, so their impls arn't removed by `ImplStripper`. [More context on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Populating.20cache.2Eimpls), thanks to @ jyn514 for helping debug this. ``@rustbot`` modify labels: +A-rustdoc-json +T-rustdoc r? ``@GuillaumeGomez`` Fixes #100252 Fixes #100242
2022-08-15rustdoc: Mark imported items as retainedNixon Enraght-Moony-0/+24
Fixes a bug where impl of items that were imported from a private module would be striped Fixes #100252 Fixes #100242
2022-08-15Add regression test for stripped enum variant fieldsGuillaume Gomez-0/+13
2022-08-13Rollup merge of #100335 - aDotInTheVoid:rdj-resolved-path, r=GuillaumeGomezMichael Goulet-28/+27
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-13make clean::Item::span return option instead of dummy spanMichael Goulet-0/+18
2022-08-12rustdoc-json: Use `@ismany` in testsNixon Enraght-Moony-36/+56
2022-08-10Rustdoc-Json: Add `Path` type for traits.Nixon Enraght-Moony-28/+27
Closes #100106
2022-08-10Auto merge of #100356 - matthiaskrgr:rollup-he0vkjc, r=matthiaskrgrbors-2/+2
Rollup of 8 pull requests Successful merges: - #99573 (Stabilize backtrace) - #100069 (Add error if link_ordinal used with unsupported link kind) - #100086 (Add more `// unit-test`s to MIR opt tests) - #100332 (Rename integer log* methods to ilog*) - #100334 (Suggest a missing semicolon before an array) - #100340 (Iterate generics_def_id_map in reverse order to fix P-critical issue) - #100345 (docs: remove repetition in `is_numeric` function docs) - #100352 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-08-10Rollup merge of #100332 - eholk:stabilize-ilog, r=scottmcmMatthias Krüger-2/+2
Rename integer log* methods to ilog* This reflects the concensus from the libs team as reported at https://github.com/rust-lang/rust/issues/70887#issuecomment-1209513261. Joint work with `@yoshuawuyts.`
2022-08-10Rollup merge of #99479 - Enselic:import-can-be-without-id, r=camelidMatthias Krüger-0/+6
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