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 8 pull requests #134822

Merged
merged 19 commits into from
Dec 27, 2024
Merged

Rollup of 8 pull requests #134822

merged 19 commits into from
Dec 27, 2024

Conversation

jieyouxu
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 19 commits December 21, 2024 08:34
This is a solution to the `std::sync::poison` linking problem,
and, in general, makes intra-doc links shorter and clearer.
This is a little more verbose, but also more explicit, and avoids invoking the
full condition engine when only the pointer-width conditions are used.
…ulacrum

ptr::copy: fix docs for the overlapping case

Fixes rust-lang/unsafe-code-guidelines#549

As discussed in that issue, it doesn't make any sense for `copy` to read a byte via `src` after it was already written via `dst`. The entire point of this method is that is copies correctly even if they overlap, and that requires always reading any given location before writing it.

Cc `@rust-lang/opsem`
…k-Simulacrum

Windows: Use WriteFile to write to a UTF-8 console

If the console code page is UTF-8 then we can simply write to it without needing to convert to UTF-16 and calling `WriteConsole`.
compiletest: Remove the `-test` suffix from normalize directives

This suffix was an artifact of using the same condition-checking engine as the `ignore-*` and `only-*` directives, but in practice we have only 2 tests that legitimately use a condition, and both of them only care about 32-bit vs 64-bit.

This PR detaches `normalize-*` directives from the condition checker, and replaces it with a much simpler system of four explicit `NormalizeKind` values. It then takes advantage of that simplicity to get rid of the `-test` suffix.

---

Addresses one of the points of rust-lang#126372.

The new name-checking code is a bit quaint, but I think it's a definite improvement over the status quo.

---

The corresponding dev-guide update is rust-lang/rustc-dev-guide#2172.

r? jieyouxu
…er-errors

Spruce up the docs of several queries related to the type/trait system and const eval

- Editorial
  - Proper rustdoc summary/synopsis line by making use of extra paragraphs: Leads to better rendered output on module pages, in search result lists and overall, too
  - Use rustdoc warning blocks for admonitions of the form "do not call / avoid calling this query directly"
  - Use intra-doc links of the form ``[`Self::$query`]`` to cross-link queries. Indeed, such links are generally a bit brittle due to the existence of `TyCtxtFeed` which only contains a subset of queries. Therefore the docs of `feedable` queries cannot cross-link to non-`feedable` ones. I'd say it's fine to use intra-doc links despite the potential/unlikely occasional future breakage (if a query with the aforementioned characteristics becomes `feedable`). `Self::` is nicer than `TyCtxt::` (which would be more stable) since it accounts for other contexts like `TyCtxt{Feed,At,Ensure{,WithValue}}`
- Informative
  - Generally add, flesh out and correct some doc comments
  - Add *Panic* sections (to a few selected queries only). The lists of panics aren't necessarily exhaustive and focus on the more "obvious" or "important" panics.
  - Where applicable add a paragraph calling attention to the relevant [`#[rustc_*]` TEST attribute](https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#rustc_-test-attributes)

The one non-doc change (it's internal and not observable):
Be even more defensive in `query constness`'s impl (spiritual follow-up to rust-lang#134122) (see self review comment).

Fixes rust-lang#133494.

r\? **any**(compiler-errors, oli-obk)
…-better, r=GuillaumeGomez

rustdoc: use shorter paths as preferred canonical paths

This is a solution to [the `std::sync::poison` linking problem](rust-lang#134692 (comment)), and, in general, makes intra-doc links shorter and clearer.

> Done. This helped with the search, but not with the things like `MutexGuard`'s doc's reference to `Mutex::lock` being converted to the absolute (unstable) `std::sync::poison::Mutex` path.

cc `@tgross35`

r? `@GuillaumeGomez`
…=jieyouxu

Sort triples by name in platform_support.md

When looking for riscv32emc support, I missed it at first because it was at the end of the tier3 target list [here](https://doc.rust-lang.org/rustc/platform-support.html#tier-3). These lists are *mostly* dictionary sorted so I assumed it should be near the riscv32i* targets.

This PR puts all targets back in dictionary order. There were only a few outside of tier3.

I ended up writing a small program to sort them because I did not trust myself to do it manually, but I stopped short of fully automating it.
I have manually reviewed the output to confirm it still has the same number of entries, and that the changed values do follow the ordering I would expect.

For folks who would prefer to review code than manual textual changes, the sorting program (including inputs) is [here.](https://github.com/9names/platform_sort_arch/blob/main/src/main.rs)
tools: fix build failure caused by PR rust-lang#134420

Someone reports build failure after merging pull request rust-lang#134420: rust-lang#134420 (comment)

This pull request fixes the build failure.
Fix mistake in windows file open

In rust-lang#134722 this should have been `c::FileAllocationInfo` not `c::FileEndOfFileInfo`. Oops.
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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. labels Dec 27, 2024
@jieyouxu
Copy link
Member Author

@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Dec 27, 2024
@bors
Copy link
Contributor

bors commented Dec 27, 2024

📌 Commit 5544091 has been approved by jieyouxu

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 Dec 27, 2024
@bors
Copy link
Contributor

bors commented Dec 27, 2024

⌛ Testing commit 5544091 with merge 6d3db55...

@bors
Copy link
Contributor

bors commented Dec 27, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 6d3db55 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 27, 2024
@bors bors merged commit 6d3db55 into rust-lang:master Dec 27, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 27, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#134606 ptr::copy: fix docs for the overlapping case 9f7b2389d7ce9070aff6bc6da32693389ebddbdd (link)
#134622 Windows: Use WriteFile to write to a UTF-8 console e10c1d1202a31f4f9e4dd83a38d78fc589459764 (link)
#134759 compiletest: Remove the -test suffix from normalize direc… 32436927820af30ae214e6532755994370e6e9e8 (link)
#134787 Spruce up the docs of several queries related to the type/t… 3719fa98ca3b06040fae0cf355f7e0bb28069417 (link)
#134806 rustdoc: use shorter paths as preferred canonical paths 19d668cca12ebaf24502be8fe8652009fee89a36 (link)
#134815 Sort triples by name in platform_support.md 70e07c9b8ebc1720ba8fcfccd51991aaa5daac93 (link)
#134816 tools: fix build failure caused by PR #134420 8cc92683e94d97b988349a63e91717c466bb1bae (link)
#134819 Fix mistake in windows file open 1e8c18e0e773f9064ed2e35edd76e36162b265a2 (link)

previous master: 42591a4cc0

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 (6d3db55): comparison URL.

Overall result: ❌ regressions - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.2% [0.1%, 0.2%] 4
Regressions ❌
(secondary)
0.2% [0.1%, 0.4%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.4%] 1
All ❌✅ (primary) 0.2% [0.1%, 0.2%] 4

Max RSS (memory usage)

Results (primary 3.1%, secondary -2.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.1% [2.9%, 3.2%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-3.7%, -1.4%] 4
All ❌✅ (primary) 3.1% [2.9%, 3.2%] 2

Cycles

Results (secondary 5.9%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.9% [2.2%, 9.8%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 765.869s -> 765.683s (-0.02%)
Artifact size: 330.63 MiB -> 330.53 MiB (-0.03%)

@rustbot rustbot added the perf-regression Performance regression. label Dec 27, 2024
poliorcetics pushed a commit to poliorcetics/rust that referenced this pull request Dec 28, 2024
Rollup of 8 pull requests

Successful merges:

 - rust-lang#134606 (ptr::copy: fix docs for the overlapping case)
 - rust-lang#134622 (Windows: Use WriteFile to write to a UTF-8 console)
 - rust-lang#134759 (compiletest: Remove the `-test` suffix from normalize directives)
 - rust-lang#134787 (Spruce up the docs of several queries related to the type/trait system and const eval)
 - rust-lang#134806 (rustdoc: use shorter paths as preferred canonical paths)
 - rust-lang#134815 (Sort triples by name in platform_support.md)
 - rust-lang#134816 (tools: fix build failure caused by PR rust-lang#134420)
 - rust-lang#134819 (Fix mistake in windows file open)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows perf-regression Performance regression. 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.