| Age | Commit message (Collapse) | Author | Lines |
|
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``
|
|
|
|
|
|
rustdoc: fix missing method list for primitive deref target
This change makes it so that local impls count when listing primitives that need retained.
Fixes #95325
|
|
Fixes #92940
|
|
This change makes it so that local impls count when listing primitives that
need retained.
|
|
rustdoc: do not write `{{root}}` in `pub use ::foo` docs
Fixes #95873
|
|
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
|
|
|
|
|
|
rustdoc: Optimize and refactor doc link resolution
One more subset of https://github.com/rust-lang/rust/pull/94857 that should bring perf improvements rather than regressions + a couple more optimizations on top of it.
It's better to read individual commits and their descriptions to understand the changes.
The `may_have_doc_links` optimization is not *very* useful here, but it's much more important for https://github.com/rust-lang/rust/pull/94857.
Closes https://github.com/rust-lang/rust/issues/96079
|
|
Remove extra space before a where clause
Remove extra space before where clause in the generated documentation.
The fix is to move the space before the break-line so that it doesn't appear visually but is still here. Removing it completely would create things like this `impl<D> Delta<D>where D: MyTrait` (missing a space before the where) which I don't think we want.
Added two regression test, first one test that the `<br>` is after the space and the second check that the `<br>` is before the spaces.
Before:

After:

r? ``@GuillaumeGomez``
|
|
|
|
|
|
|
|
|
|
The current "This is supported" wording implies that it's possible to
still use the item on other configurations, but in an unsupported way.
Changing this to "Available" removes this ambiguity.
|
|
|
|
|
|
Add a note for unsatisfied `~const Drop` bounds
r? ``@oli-obk``
|
|
|
|
Hide cross-crate `#[doc(hidden)]` associated items in trait impls
Fixes #95717.
r? ```@GuillaumeGomez```
This is the bug I ran into in #95316.
```@rustbot``` label T-rustdoc A-cross-crate-reexports
|
|
|
|
|
|
Bump bootstrap compiler to 1.61.0 beta
This PR bumps the bootstrap compiler to the 1.61.0 beta. The first commit changes the stage0 compiler, the second commit applies the "mechanical" changes and the third and fourth commits apply changes explained in the relevant comments.
r? `@Mark-Simulacrum`
|
|
|
|
|
|
GuillaumeGomez:intra-doc-link-ice-traits-in-scope-primitive, r=jyn514
Fix intra doc link ICE when trying to get traits in scope for primitive
Fixes #95633.
I think ``@notriddle`` was the one who worked on this part of the code last so:
r? ``@notriddle``
|
|
rustdoc: Fix resolution of `crate`-relative paths in doc links
Resolve `crate::foo` paths transparently to rustdoc, so their resolution no longer affects diagnostics and modules used for determining traits in scope.
The proper solution is to account for the current `module_id`/`parent_scope` in `fn resolve_crate_root`, but it's a slightly larger compiler changes. This PR moves the code closer to it, but keeps it rustdoc-specific.
Fixes https://github.com/rust-lang/rust/issues/78696
Fixes https://github.com/rust-lang/rust/issues/94924
|
|
|
|
Fix rustdoc attribute display
Fixes #81482.
r? `@notriddle`
|
|
|
|
Handle rustc_const_stable attribute in library feature collector
The library feature collector in [compiler/rustc_passes/src/lib_features.rs](https://github.com/rust-lang/rust/blob/551b4fa395fa588d91cbecfb0cdfe1baa02670cf/compiler/rustc_passes/src/lib_features.rs) has only been looking at `#[stable(…)]`, `#[unstable(…)]`, and `#[rustc_const_unstable(…)]` attributes, while ignoring `#[rustc_const_stable(…)]`. The consequences of this were:
- When any const feature got stabilized (changing one or more `rustc_const_unstable` to `rustc_const_stable`), users who had previously enabled that unstable feature using `#![feature(…)]` would get told "unknown feature", rather than rustc's nicer "the feature … has been stable since … and no longer requires an attribute to enable".
This can be seen in the way that https://github.com/rust-lang/rust/pull/93957#issuecomment-1079794660 failed after rebase:
```console
error[E0635]: unknown feature `const_ptr_offset`
--> $DIR/offset_from_ub.rs:1:35
|
LL | #![feature(const_ptr_offset_from, const_ptr_offset)]
| ^^^^^^^^^^^^^^^^
```
- We weren't enforcing that a particular feature is either stable everywhere or unstable everywhere, and that a feature that has been stabilized has the same stabilization version everywhere, both of which we enforce for the other stability attributes.
This PR updates the library feature collector to handle `rustc_const_stable`, and fixes places in the standard library and test suite where `rustc_const_stable` was being used in a way that does not meet the rules for a stability attribute.
|
|
Rollup of 6 pull requests
Successful merges:
- #95032 (Clean up, categorize and sort unstable features in std.)
- #95260 (Better suggestions for `Fn`-family trait selection errors)
- #95293 (suggest wrapping single-expr blocks in square brackets)
- #95344 (Make `impl Debug for rustdoc::clean::Item` easier to read)
- #95388 (interpret: make isize::MAX the limit for dynamic value sizes)
- #95530 (rustdoc: do not show primitives and keywords as private)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Jules-Bertholet:rustdoc-hide-assoc-consts-from-trait-impls, r=jsha
rustdoc: Only show associated consts from inherent impls in sidebar
Resolves #95459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove header field from clean::Function
Fixes https://github.com/rust-lang/rust/issues/89673.
This is another take on https://github.com/rust-lang/rust/issues/89673 (compared to https://github.com/rust-lang/rust/pull/91217) but very different on the approach: I moved the header call in one place but still require to have the `clean::Item` so I can use the `DefId` to get what is missing.
cc `@jyn514` (you reviewed the original so maybe you want to take a look?)
r? `@camelid`
|
|
|
|
r=GuillaumeGomez,camelid,jsha
rustdoc: add 🔒 to items with restricted visibility
This change marks items with restricted visibility with 🔒 when building with `--document-private-items`:
<img width="278" alt="Screen Shot 2022-03-20 at 23 50 24" src="https://user-images.githubusercontent.com/509209/159189513-9e4b09bb-6785-41a5-bfe2-df02f83f8641.png">
There also appears a “Restricted Visibility” tooltip when hovering over the emoji.
---
The original PR for reference:
This change makes private items slightly transparent (similar to `unstable` items in rustc):
<img width="272" alt="Screen Shot 2022-03-16 at 22 17 43" src="https://user-images.githubusercontent.com/509209/158692627-a1f6f5ec-e043-4aa2-9352-8d2b15c31c08.png">
I found myself using `--document-private-items` a lot recently because I find the documentation of private internals quite helpful when working on a larger project. However, not being able to distinguish private from public items (see #87785) when looking at the documentation makes this somewhat cumbersome.
This PR addresses the third suggestion of issue #87785 by marking private items typographically. It seems to me that the other suggestions are more involved but this is at least a first step.
A private item is also made slightly transparent in the path displayed in the header of a page:
<img width="467" alt="Screen Shot 2022-03-16 at 22 19 51" src="https://user-images.githubusercontent.com/509209/158692885-0bbd3417-3c0b-486f-b8ab-99c05c6fa7ca.png">
I am looking forward to feedback and suggestions.
|
|
|
|
|
|
Unify impl blocks by wrapping them into a div
The blanket and "auto traits" sections are wrapped into a `div` with an ID. This PR fixes this incoherence by wrapping each impl section (the "deref impl" and the "inherent impl" sections were missing it). It'll also make some tests simpler to write.
r? `````@notriddle`````
|
|
|
|
|