summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2022-05-14Auto merge of #96883 - jackh726:early-binder-2, r=oli-obkbors-11/+11
Add EarlyBinder Chalk has no concept of `Param` (https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L579) or `ReEarlyBound` (https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L1308). Everything is just "bound" - the equivalent of rustc's late-bound. It's not completely clear yet whether to move everything to the same time of binder in rustc or add `Param` and `ReEarlyBound` in Chalk. Either way, tracking when we have or haven't already substituted out these in rustc can be helpful. As a first step, I'm just adding a `EarlyBinder` newtype that is required to call `subst`. I also add a couple "transparent" `bound_*` wrappers around a couple query that are often immediately substituted. r? `@nikomatsakis`
2022-05-14Auto merge of #96345 - petrochenkov:linclean, r=notriddlebors-503/+241
rustdoc: Cleanup doc link resolution See individual commits for specific changes
2022-05-14Rollup merge of #96998 - notriddle:notriddle/var-N, r=jshaYuki Okushi-1/+1
rustdoc: remove weird, unused variable from source-files.js
2022-05-13Add bound_impl_trait_refJack Huey-5/+5
2022-05-13Add bound_type_ofJack Huey-5/+5
2022-05-13resolve: Move collection of all `macro_rules` in the crate to rustdocVadim Petrochenkov-2/+6
2022-05-13Fix rebaseVadim Petrochenkov-5/+2
2022-05-13rustdoc: Use `Visibility::is_public` moreVadim Petrochenkov-10/+6
2022-05-13rustdoc: Do not resolve associated item paths unnecessarilyVadim Petrochenkov-11/+9
2022-05-13rustdoc: Do not create `UrlFragment`s until they are necessaryVadim Petrochenkov-236/+133
This simplifies error types and allows to remove `fn resolve_inner` and `fn check_full_res` `visited_links` caching is not touched for now
2022-05-13rustdoc: Remove `fn resolve_macro`Vadim Petrochenkov-119/+43
and otherwise unify resolution in macro namespace and other namespaces
2022-05-13rustdoc: Remove `ResolutionFailure::Dummy`Vadim Petrochenkov-37/+20
The variant resolution check didn't make sense, and derive trait collision could be processed in a different way
2022-05-13rustdoc: Remove `ResolutionFailure::MalformedGenerics`Vadim Petrochenkov-81/+61
in favor of `PreprocessingError::MalformedGenerics`
2022-05-13rustdoc: Remove `ResolutionFailure::NoParentItem`Vadim Petrochenkov-49/+8
It's a bug and not an error
2022-05-12rustdoc: remove weird, unused variable from source-files.jsMichael Howell-1/+1
2022-05-12rustdoc: fix GUI crash when searching for magic JS property valuesMichael Howell-2/+2
2022-05-12Auto merge of #96974 - matthiaskrgr:rollup-jd4otnc, r=matthiaskrgrbors-39/+5
Rollup of 5 pull requests Successful merges: - #95896 (Note the contacts for the nvptx64 target(s)) - #96860 (openbsd: convert futex timeout managment to Timespec usage) - #96939 (Fix settings page CSS) - #96941 (update graphviz links) - #96968 (Add tests for #96806) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-12Rollup merge of #96939 - GuillaumeGomez:settings-css, r=notriddleMatthias Krüger-39/+5
Fix settings page CSS In https://github.com/rust-lang/rust/pull/96741, I moved the CSS loading outside of `settings.js`. The result was that on the settings page, there isn't the settings CSS anymore: ![Screenshot from 2022-05-11 11-09-24](https://user-images.githubusercontent.com/3050060/167817969-6750931b-3e6e-4178-b5a9-ee3851e983be.png) I also used this opportunity to remove unused CSS rules (we don't have `<select>` elements anymore in the settings). cc `@jsha` r? `@notriddle`
2022-05-12Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwcobors-23/+27
don't encode only locally used attrs Part of https://github.com/rust-lang/compiler-team/issues/505. We now filter builtin attributes before encoding them in the crate metadata in case they should only be used in the local crate. To prevent accidental misuse `get_attrs` now requires the caller to state which attribute they are interested in. For places where that isn't trivially possible, I've added a method `fn get_attrs_unchecked` which I intend to remove in a followup PR. After this pull request landed, we can then slowly move all attributes to only be used in the local crate while being certain that we don't accidentally try to access them from extern crates. cc https://github.com/rust-lang/rust/pull/94963#issuecomment-1082924289
2022-05-11Rollup merge of #91518 - luojia65:rustdoc-riscv-arch, r=GuillaumeGomezDylan DPC-0/+2
Add readable rustdoc display for RISC-V target This pull request adds a human readable rustdoc display for RISC-V architecture. Target configuration marked as `#[cfg(target_arch = "riscv32")]` or `#[cfg(target_arch = "riscv64")]` are pretty formatted like `RISC-V RV32` and `RISC-V RV64` in Rust docs. Before: ![图片](https://user-images.githubusercontent.com/40385009/152681944-58d758ae-ac4f-412b-b70c-1e673a2a071e.png) After: ![图片](https://user-images.githubusercontent.com/40385009/152681923-91d5fe75-c3b2-4ac2-865c-54eac0aefe8d.png)
2022-05-11Remove unused CSS settings rulesGuillaume Gomez-36/+0
2022-05-11Add missing CSS file for settings pageGuillaume Gomez-3/+5
2022-05-11Rollup merge of #96900 - GuillaumeGomez:fix-js-error, r=notriddleYuki Okushi-3/+1
Fix js error On the source code pages, we get a JS error: ![Screenshot from 2022-05-10 16-26-53](https://user-images.githubusercontent.com/3050060/167656292-51e0b0e9-6b0c-4f94-82e0-dd8fb77adf52.png) It's fixed in the first commit. The second one is removing an unused CSS rule and the third one is a little cleanup of a GUI test. cc ``@jsha`` r? ``@notriddle``
2022-05-11Rollup merge of #96887 - notriddle:notriddle/as-raw-fd, r=jshaYuki Okushi-8/+1
rustdoc: correct path to type alias methods Fixes #83991
2022-05-10Introduce EarlyBinderJack Huey-5/+5
2022-05-10rustdoc: clean up method path indexMichael Howell-9/+1
This removes a special case that doesn't seem to do anything any more.
2022-05-11Rollup merge of #96879 - notriddle:notriddle/search-ranking, r=GuillaumeGomezYuki Okushi-1/+1
rustdoc: search result ranking fix # Before ![image](https://user-images.githubusercontent.com/1593513/167477286-91049761-67f9-4a73-8fb7-09dbb19ca76c.png) # After ![image](https://user-images.githubusercontent.com/1593513/167477345-6733bc0f-4bb2-4625-9f7f-094031e36414.png)
2022-05-10Remove unused CSS ruleGuillaume Gomez-1/+0
2022-05-10Fix JS error in source code pagesGuillaume Gomez-2/+1
2022-05-10update rustdoclcnr-23/+27
2022-05-09rustdoc: correct path to type alias methodsMichael Howell-1/+2
2022-05-09rustdoc: search result ranking fixMichael Howell-1/+1
2022-05-09Rollup merge of #96858 - notriddle:notriddle/cleanup-search-js, r=GuillaumeGomezMatthias Krüger-2/+2
Remove unused param from search.js::checkPath
2022-05-08Remove unused param from search.js::checkPathMichael Howell-2/+2
2022-05-09Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errorsbors-2/+2
Remove `#[rustc_deprecated]` This removes `#[rustc_deprecated]` and introduces diagnostics to help users to the right direction (that being `#[deprecated]`). All uses of `#[rustc_deprecated]` have been converted. CI is expected to fail initially; this requires #95958, which includes converting `stdarch`. I plan on following up in a short while (maybe a bootstrap cycle?) removing the diagnostics, as they're only intended to be short-term.
2022-05-09Auto merge of #95542 - xFrednet:rfc-2383-expect-query, r=wesleywiserbors-0/+4
Support tool lints with the `#[expect]` attribute (RFC 2383) This PR fixes the ICE https://github.com/rust-lang/rust/issues/94953 by making the assert for converted expectation IDs conditional. Additionally, it moves the lint expectation check into a separate query to support rustdoc and other tools. On the way, I've also added some tests to ensure that the attribute works for Clippy and rustdoc lints. The number of changes comes from the long test file. This may look like a monster PR, this may smell like a monster PR and this may be a monster PR, but it's a harmless monster. :sauropod: --- Closes: https://github.com/rust-lang/rust/issues/94953 cc: https://github.com/rust-lang/rust/issues/85549 r? `@wesleywiser` cc: `@rust-lang/rustdoc`
2022-05-08Rollup merge of #96835 - GuillaumeGomez:eslint-rules, r=notriddleMatthias Krüger-0/+5
Add more eslint rules Slowly continuing to enforce more rules with eslint. Part of https://github.com/rust-lang/rust/issues/93058. r? `@notriddle`
2022-05-08Auto merge of #96770 - flip1995:fix-trait-type-in-bounds, r=cjgillotbors-1/+2
Track if a where bound comes from a impl Trait desugar With https://github.com/rust-lang/rust/pull/93803 `impl Trait` function arguments get desugared to hidden where bounds. However, Clippy needs to know if a bound was originally a `impl Trait` or an actual bound. This adds a field to the `WhereBoundPredicate` struct to keep track of this information during AST->HIR lowering. r? `@cjgillot` cc `@estebank` (as the reviewer of #93803)
2022-05-08Support `#[expect]` attributes for rustdoc lints (RFC 2383)xFrednet-0/+4
2022-05-08Enforce no trailing spaces with eslintGuillaume Gomez-0/+1
2022-05-08Enforce linebreak style in js source codeGuillaume Gomez-0/+4
2022-05-07Enforce quote rule for JS source codeGuillaume Gomez-52/+56
2022-05-07Track if a where bound comes from a impl Trait desugarflip1995-1/+2
With #93803 `impl Trait` function arguments get desugared to hidden where bounds. However, Clippy needs to know if a bound was originally a impl Trait or an actual bound. This adds a field to the `WhereBoundPredicate` struct to keep track of this information during HIR lowering.
2022-05-07Rollup merge of #96805 - Folyd:eslint, r=GuillaumeGomezGuillaume Gomez-30/+4
Change eslint rules from configuration comments to configuration file Repeatedly declaring eslint rules in source files is an annoying thing, we should move those rules into the eslint configuration file. r? ``@GuillaumeGomez``
2022-05-07Rollup merge of #96636 - GuillaumeGomez:fix-jump-to-def-regression, r=notriddleGuillaume Gomez-3/+1
Fix jump to def regression https://github.com/rust-lang/rust/pull/93803 introduced a regression in the "jump to def" feature. This fixes it. Nice side-effect: it adds a new regression test. :) I also used this opportunity to add documentation about this unstable feature in the rustdoc book. cc ``@cjgillot`` r? ``@notriddle``
2022-05-07Change eslint rules from configuration comments to configuration filesFolyd-30/+4
2022-05-06Remove unneeded SpanMapVisitor::visit_generics functionGuillaume Gomez-13/+1
2022-05-06Rollup merge of #96754 - notriddle:notriddle/impl-dups, r=GuillaumeGomezGuillaume Gomez-16/+103
rustdoc: ensure HTML/JS side implementors don't have dups Fixes #94641 Rendered: - https://notriddle.com/notriddle-rustdoc-test/impl-dups/std/iter/trait.Iterator.html - https://notriddle.com/notriddle-rustdoc-test/impl-dups/core/iter/trait.Iterator.html
2022-05-06Rollup merge of #96748 - GuillaumeGomez:reexports-in-search, r=notriddleGuillaume Gomez-3/+29
Fixes reexports in search Fixes #96681. At some point we stopped reexporting items in search so this PR fixes it. It also adds a regression test. r? ```@notriddle```
2022-05-06Rollup merge of #96590 - notriddle:notriddle/tab-bar-fn-search, ↵Guillaume Gomez-25/+49
r=GuillaumeGomez,jsha rustdoc: when running a function-signature search, tweak the tab bar # Before ![In Names (7) / In Parameters (0) / In Return types (0)](https://user-images.githubusercontent.com/1593513/166122875-ffdeafe6-8d4d-4e61-84a6-f5986b50ac35.png) # After ![In Function Signature (7)](https://user-images.githubusercontent.com/1593513/166122883-9a3d7515-3235-4ee3-8c4b-5401d109e099.png)