about summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2023-07-24Re-add missing generics in `first_non_private`Guillaume Gomez-3/+23
2023-07-24Add support for `--document-hidden-items` in `first_non_private`Guillaume Gomez-1/+2
2023-07-24Add test for private itemsGuillaume Gomez-0/+3
2023-07-24Correctly handle `super` and `::`Guillaume Gomez-1/+10
2023-07-24Rename `first_not_private` into `first_non_private`Guillaume Gomez-2/+2
2023-07-24Improve code readabilityGuillaume Gomez-32/+27
2023-07-24If re-export is private, get the next item until a public one is found or ↵Guillaume Gomez-3/+93
expose the private item directly
2023-07-24Fix missing attribute merge on glob foreign re-exportsGuillaume Gomez-16/+37
2023-07-22fix doc links on `extern crate` itemsLukas Markeffsky-13/+14
2023-07-22rustdoc: handle cross-crate RPITITs correctlyLeón Orell Valerian Liehr-1/+4
2023-07-20XSimplifiedType to SimplifiedType::Xlcnr-28/+27
2023-07-19Rollup merge of #113785 - GuillaumeGomez:tests/rustdoc/issue-105735-fix, ↵Dylan DPC-3/+16
r=notriddle,aDotInTheVoid Fix invalid display of inlined re-export when both local and foreign items are inlined Fixes #105735. The bug is actually quite interesting: at the `clean` pass, local inlined items have their `use` item removed, however foreign items don't have their `use` item removed because it's in the `clean` pass that we handle them. So when a `use` inlines both a local and a foreign item, it will work as expected for the foreign one, but not for the local as its `use` should not be around anymore. To prevent this, I created a new `inlined_foreigns` field into the `Module` struct to allow to remove the `use` item early on for foreign items as well. Then we iterate it in the `clean` pass directly. r? ``@notriddle``
2023-07-18support for mips32r6 as a target_arch valuechenx97-0/+1
2023-07-18support for mips64r6 as a target_arch valuechenx97-0/+1
2023-07-18Remove unneeded `Option<Symbol>` in `foreign_items`Guillaume Gomez-1/+1
2023-07-18Fix invalid display of inlined re-exportGuillaume Gomez-3/+16
2023-07-18Auto merge of #113801 - compiler-errors:iter-instantiated, r=oli-obkbors-2/+2
Rename `arg_iter` to `iter_instantiated` `arg_iter` doesn't make sense, and doesn't really indicate what it's doing (returning an iterator that ~~substitutes~~ instantiates its elements). `iter_instantiated_copied` is kinda awkward but i don't really wanna bikeshed it. r? `@oli-obk`
2023-07-18Auto merge of #113574 - GuillaumeGomez:rustdoc-json-strip-hidden-impl, ↵bors-8/+8
r=aDotInTheVoid,notriddle Strip impl if not re-exported and is doc(hidden) Part of #112852. r? `@aDotInTheVoid`
2023-07-17Rename arg_iter to iter_instantiatedMichael Goulet-2/+2
2023-07-14Correctly handle `--document-hidden-items`Guillaume Gomez-8/+8
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-80/+78
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-18/+16
2023-07-03remove TypeWellFormedFromEnvMichael Goulet-2/+1
2023-06-27Auto merge of #113083 - matthiaskrgr:rollup-anbqpij, r=matthiaskrgrbors-1/+4
Rollup of 3 pull requests Successful merges: - #113039 (make custom mir ICE a bit nicer) - #113058 (Add/improve code comments) - #113063 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-27Rollup merge of #113058 - GuillaumeGomez:improve-code-comments, r=notriddleMatthias Krüger-1/+4
Add/improve code comments Working on something else and did some small comments updates/adds. r? `@notriddle`
2023-06-26Migrate predicates_of and caller_bounds to ClauseMichael Goulet-39/+19
2023-06-26Add/improve code commentsGuillaume Gomez-1/+4
2023-06-26Rollup merge of #112920 - fmease:rustdoc-fix-112904, r=GuillaumeGomezTakayuki Maeda-43/+45
rustdoc: render generic params & where-clauses of cross-crate assoc tys in impls We used to only ever render generic parameters & where-clauses of cross-crate associated types when the item was located inside of a trait and we used to just drop them when it was inside of an impl block (trait or inherent). Fixes #112904. `@rustbot` label A-cross-crate-reexports
2023-06-25rustdoc: handle assoc const equalities in cross-crate impl-Trait-in-arg-posLeón Orell Valerian Liehr-13/+5
2023-06-24rustdoc: render gen params & where-clauses of cross-crate assoc tys in impl ↵León Orell Valerian Liehr-43/+45
blocks
2023-06-23Rollup merge of #112870 - compiler-errors:clause-2, r=oli-obkMatthias Krüger-13/+8
Migrate `item_bounds` to `ty::Clause` Should be simpler than the next PR that's coming up. Last three commits are the relevant ones. r? ``@oli-obk`` or ``@lcnr``
2023-06-23Link to the corresponding channel in the help popoverGuillaume Gomez-0/+3
2023-06-22Migrate item_bounds to ty::ClauseMichael Goulet-13/+8
2023-06-21Rollup merge of #112853 - GuillaumeGomez:type_alias_type, r=oli-obkGuillaume Gomez-4/+17
Add `lazy_type_alias` feature gate Add the `type_alias_type` to be able to have the weak alias used without restrictions. Part of #112792. cc `@compiler-errors` r? `@oli-obk`
2023-06-21Rollup merge of #112836 - GuillaumeGomez:rustdoc-invalid-file-creation, ↵Guillaume Gomez-9/+13
r=notriddle [rustdoc] partially fix invalid files creation Part of #111249. It only removes generation for modules which shouldn't exist. For files, we need the compiler to keep re-export information alive for external items so we can actually have the right path to their location as it's currently not generating them correctly. In case the item is inlined, it shouldn't (and neither should its children) get a file generated. r? ```@notriddle```
2023-06-21Correctly handle Weak type aliases in rustdocGuillaume Gomez-4/+17
2023-06-21Rollup merge of #112772 - compiler-errors:clauses-1, r=lcnrNilstrieb-20/+21
Add a fully fledged `Clause` type, rename old `Clause` to `ClauseKind` Does two basic things before I put up a more delicate set of PRs (along the lines of #112714, but hopefully much cleaner) that migrate existing usages of `ty::Predicate` to `ty::Clause` (`predicates_of`/`item_bounds`/`ParamEnv::caller_bounds`). 1. Rename `Clause` to `ClauseKind`, so it's parallel with `PredicateKind`. 2. Add a new `Clause` type which is parallel to `Predicate`. * This type exposes `Clause::kind(self) -> Binder<'tcx, ClauseKind<'tcx>>` which is parallel to `Predicate::kind` 😸 The new `Clause` type essentially acts as a newtype wrapper around `Predicate` that asserts that it is specifically a `PredicateKind::Clause`. Turns out from experimentation[^1] that this is not negative performance-wise, which is wonderful, since this a much simpler design than something that requires encoding the discriminant into the alignment bits of a predicate kind, or something else like that... r? ``@lcnr`` or ``@oli-obk`` [^1]: https://github.com/rust-lang/rust/pull/112714#issuecomment-1595653910
2023-06-20Add `Item::def_id` helperGuillaume Gomez-9/+13
2023-06-19Clean up "doc(hidden)" checkGuillaume Gomez-3/+11
2023-06-19s/Clause/ClauseKindMichael Goulet-20/+21
2023-06-17Move ConstEvaluatable to ClauseMichael Goulet-1/+1
2023-06-17Move WF goal to clauseMichael Goulet-1/+1
2023-06-16Add `AliasKind::Weak` for type aliases.Oli Scherer-0/+5
Only use it when the type alias contains an opaque type. Also does wf-checking on such type aliases.
2023-06-14remove drain-on-drop behavior from vec::DrainFilter and add #[must_use]The 8472-3/+3
2023-06-07use wf::object_region_boundsLeón Orell Valerian Liehr-42/+9
2023-06-07rustdoc: re-elide cross-crate default trait object lifetime boundsLeón Orell Valerian Liehr-49/+268
2023-06-05cleanup some skip_binder -> subst_identityKyle Matsuda-3/+3
2023-06-04Rollup merge of #112178 - GuillaumeGomez:fix-inline-private-intermediate, ↵Matthias Krüger-1/+2
r=notriddle Fix bug where private item with intermediate doc hidden re-export was not inlined This fixes this bug: ```rust mod private { /// Original. pub struct Bar3; } /// Hidden. #[doc(hidden)] pub use crate::private::Bar3; /// Visible. pub use self::Bar3 as Reexport; ``` In this case, `private::Bar3` should be inlined and renamed `Reexport` but instead we have: ``` pub use self::Bar3 as Reexport; ``` and no links. There were actually two issues: the first one is that we forgot to check if the next intermediate re-export was doc hidden. The second was that we made the `#[doc(hidden)]` attribute inheritable, which shouldn't be possible. r? `@notriddle`
2023-06-01Fix bug where private item with intermediate doc hidden re-export was not ↵Guillaume Gomez-1/+2
inlined
2023-06-01Rename `impl_defaultness` to `defaultness`Deadbeef-3/+3