Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #132513

Merged
merged 11 commits into from
Nov 2, 2024
Merged

Rollup of 5 pull requests #132513

merged 11 commits into from
Nov 2, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Lukas Markeffsky and others added 11 commits November 2, 2024 00:31
Since `#[link_section]` is enclosed in braces, it was being confused with a link during docs compilation.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
…omez

rustdoc: skip stability inheritance for some item kinds

For some item kinds it's incorrect to inherit their parent's stability, because they might be accessible without referring to the parent directly -- This PR removes the stability inheritance for these items and reverts their displayed stability to that before rust-lang#130798.

Impl items, both inherent and trait impls, have a stability, but it is ignored when checking for enabled features. However, impl items are automatically unstable if they're nested inside an unstable module -- this caused the children of impl to inherit the instability and lead to rust-lang#132440.

Furthermore, for associated items only the stability of the associated item itself is checked and not that of its parent impl. This is true even for trait impls and we have [relied on this behavior in the standard library in the past](https://doc.rust-lang.org/1.37.0/std/slice/trait.SliceConcatExt.html#tymethod.concat), so these also shouldn't inherit the impl's stability.

I've also removed the stability inheritance for primitives and keywords so that viewing e.g. [the `i32` docs on `core`](https://doc.rust-lang.org/nightly/core/primitive.i32.html) will no longer show "since 1.6.0". Note that we currently don't annotate stability for the keyword docs, but if we start doing so in the future then this is probably more correct.

fixes (after backport) rust-lang#132440
library: fix some stability annotations

This PR updates some stability attributes to correctly reflect when some items actually got stabilized. Found while testing rust-lang#132481.

### `core::char` / `std::char`

In rust-lang#26192, the `core::char` module got "stabilized" for 1.2.0, but the `core` crate itself was still unstable until 1.6.0.

In rust-lang#49698, the `std::char` module was changed to a re-export of `core::char`, making `std::char` appear as "stable since 1.2.0", even though it was already stable in 1.0.0.

By marking `core::char` as stable since 1.0.0, the docs will show correct versions for both `core::char` (since 1.6.0) and `std::char` (since 1.0.0). This is also consistent with the stabilities of similar re-exported modules like `core::mem`/`std::mem` for example.

### `{core,std}::array` and `{core,std}::array::TryFromSliceError`

In rust-lang#58302, the `core::array::TryFromSliceError` type got stabilized for 1.34.0, together with `TryFrom`. At that point the `core::array` module was still unstable and a `std::array` re-export didn't exist, but `core::array::TryFromSliceError` could still be named due to rust-lang#95956 to existing yet.

Then, `core::array` got stabilized and `std::array` got added, first targeting 1.36.0 in rust-lang#60657, but then getting backported for 1.35.0 in rust-lang#60838.

This means that `core::array` and `std::array` actually got stabilized in 1.35.0 and `core::array::TryFromSliceError` was accessible through the unstable module in 1.34.0 -- mark them as such so that the docs display the correct versions.
…=jieyouxu

Fix type reference in documents which was being confused with html tags.

Running `x dist` was failing due to it invoking commands with `-D warnings`, which emitted a warning about unclosed html tags.
…, r=jieyouxu

make `download-rustc="if-unchanged"` default for library profile

Since `download-rustc` is tested on CI and rust-lang#132267 makes it effective for library development, we can now make it default for the library profile.

Implements the 3rd item from [this tracking issue](rust-lang#131744).
…r=jieyouxu

Remove unintended link

Since `#[link_section]` is enclosed in braces, it was being confused with a link during docs compilation.

This caused compilation to fail when running `x dist` since it emitted a warning regarding broken links.
@rustbot rustbot added O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 2, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Nov 2, 2024

📌 Commit c402458 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 2, 2024
@bors
Copy link
Contributor

bors commented Nov 2, 2024

⌛ Testing commit c402458 with merge 07cbbdd...

@bors
Copy link
Contributor

bors commented Nov 2, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 07cbbdd to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 2, 2024
@bors bors merged commit 07cbbdd into rust-lang:master Nov 2, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 2, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#132481 rustdoc: skip stability inheritance for some item kinds 2b5fb37fd96c1e6ba4f6101c6b60f0ef7d48ffaa (link)
#132482 library: fix some stability annotations bde2adf252a37e96215598c649af26be205b467b (link)
#132493 Fix type reference in documents which was being confused wi… 9fa9a03c915cef4d41026c2e94da6f1aacff9ae0 (link)
#132494 make download-rustc="if-unchanged" default for library pr… f997188d4053dd71a262d3604e77730c7c7a362d (link)
#132495 Remove unintended link 86381e76bd21bad4a45bb291cd52eeafc8b99c97 (link)

previous master: 588a420350

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (07cbbdd): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 780.173s -> 779.63s (-0.07%)
Artifact size: 335.37 MiB -> 335.35 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants