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 10 pull requests #134414

Merged
merged 28 commits into from
Dec 17, 2024
Merged

Rollup of 10 pull requests #134414

merged 28 commits into from
Dec 17, 2024

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Dec 17, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ehuss and others added 28 commits December 15, 2024 20:28
By making the variable names more descriptive it becomes easier to
understand the code. Especially with the more complicated code in the
next commit.
Since the previos commit renamed `assignment_rhs_span` to just
`rhs_span` there is no need for a variable just to shorten the
expression on the next line. Inline the variable.
All the other unconditional keywords are in the alphabetical order, but
`while` is for some reason not.
`CheckAttrVisitor::check_doc_keyword` checks `#[doc(keyword = "..")]`
attributes to ensure they are on an empty module, and that the value is
a non-empty identifier.

The `rustc::existing_doc_keyword` lint checks these attributes to ensure
that the value is the name of a keyword.

It's silly to have two different checking mechanisms for these
attributes. This commit does the following.
- Changes `check_doc_keyword` to check that the value is the name of a
  keyword (avoiding the need for the identifier check, which removes a
  dependency on `rustc_lexer`).
- Removes the lint.
- Updates tests accordingly.

There is one hack: the `SelfTy` FIXME case used to used to be handled by
disabling the lint, but now is handled with a special case in
`is_doc_keyword`. That hack will go away if/when the FIXME is fixed.

Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
In rust-lang#129533 the main hash function changed and the order of `-Z
input-stats` output changed, which showed that it is dependent on the
hash function, even though it is sorted. That's because entries with the
same cumulative size are ordered in a way that depends on the hash
function.

This commit fixes that by using the entry label as the secondary
ordering key.
…d, r=GuillaumeGomez

Remove `rustc::existing_doc_keyword` lint

The check doesn't require a lint.

r? ``@GuillaumeGomez``
…ler-errors

Handle fndef rendering together with signature rendering

Pulled out of rust-lang#134353

Changes some highlighting in type mismatch errors around fndefs
Rename `rustc_mir_build::build` to `builder`

GitHub's “Go to file” feature silently ignores all files in this module, presumably because they are in a directory named `build`, which is mistaken for a build-output directory. That makes it meaningfully harder to view those files and their history via GitHub.

This PR sidesteps that issue by renaming `build` to `builder`, which in context has basically the same meaning, but can't be mistaken for a build-output directory.

---

Extracted from rust-lang#133404, after rust-lang#133592 changed the .gitignore rule from `build/` to `/build`. The problem of GitHub ignoring these files still exists even after that change, which suggests that GitHub's behaviour is a hard-coded heuristic that isn't influenced by the repository's git settings.

Currently this PR doesn't include the tidy rule forbidding `build` as a module name, but that could be added if people think it's a good idea.
Use links to edition guide for edition migrations

This switches the migration lints for the 2024 edition to point to the edition guide documentation instead of the tracking issues. I expect the documentation should be easier to understand for a user, compared to most of the issues which don't have any direct information, and can be a bit confusing to navigate, or have outdated information.
rustc_borrowck: Suggest changing `&raw const` to `&raw mut` if applicable

Closes rust-lang#127562

For reference, here is the diff compared to the original error reported in that issue before rust-lang#134244 stopped suggesting the invalid syntax:

```
diff --git a/tests/ui/borrowck/no-invalid-mut-suggestion-for-raw-pointer-issue-127562.stderr b/tests/ui/borrowck/no-invalid-mut-suggestion-for-raw-pointer-issue-127562.stderr
index 0da5d15cf7f..dbe834b6b78 100644
--- a/tests/ui/borrowck/no-invalid-mut-suggestion-for-raw-pointer-issue-127562.stderr
+++ b/tests/ui/borrowck/no-invalid-mut-suggestion-for-raw-pointer-issue-127562.stderr
``@@`` -6,8 +6,8 ``@@`` LL |     unsafe { *ptr = 3; }
    |
 help: consider changing this to be a mutable pointer
    |
-LL |     let ptr = &mut raw const val;
-   |                +++
+LL |     let ptr = &raw mut val;
+   |                    ~~~

 error: aborting due to 1 previous error
```
…=compiler-errors

AIX: add alignment info for test

Supply alignment and size info for test cases for AIX.
…mpiler-errors

Fix some comments related to upvars handling

I'm tidying up my ergonomic ref counting PR and I'm going to make some small, simple and unrelated changes outside that PR, so the main PR sticks more straight to the point.
…ng, r=jieyouxu

Fix `-Z input-stats` ordering

It currently depends on the hash algorithm.

r? `@Noratrieb`
…ouxu

bootstrap: fix a comment

I don't actually know if this is right, though...  but "a single call to `paths` will only ever generate a single call to `paths`" just does not make sense.
…ackh726

small borrowck cleanup

the already approved parts of rust-lang#133909 and rust-lang#133961

r? `@jackh726`
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 17, 2024
@rustbot rustbot added 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. rollup A PR which is a rollup labels Dec 17, 2024
@jhpratt
Copy link
Member Author

jhpratt commented Dec 17, 2024

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Dec 17, 2024

📌 Commit cdd71c9 has been approved by jhpratt

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

bors commented Dec 17, 2024

⌛ Testing commit cdd71c9 with merge f23a80a...

@bors
Copy link
Contributor

bors commented Dec 17, 2024

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing f23a80a to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#134202 Remove rustc::existing_doc_keyword lint 02a739165c40c4e3f34ce0f09afe936708d401f7 (link)
#134354 Handle fndef rendering together with signature rendering 6ead6768b1917b4e640bd14c4647013bef7be909 (link)
#134365 Rename rustc_mir_build::build to builder eb8cab07ca68823c7d97d070b949aebbeac0a188 (link)
#134368 Use links to edition guide for edition migrations 3e4786465018b32693bb375ba4f400e3c64052af (link)
#134397 rustc_borrowck: Suggest changing &raw const to &raw mut 8ac0c0fc23626e584b89aa3b22908dad99442d3d (link)
#134398 AIX: add alignment info for test 12d6c2dcaa1b18cffe77ade2ae0329893b8ab161 (link)
#134400 Fix some comments related to upvars handling 1edda11b41faf419c8443fe866c8121d0b450286 (link)
#134406 Fix -Z input-stats ordering 862f51e4b470a21db720891e2f68962823d9bd2c (link)
#134409 bootstrap: fix a comment ec72379773e8482c6fed05fab164b1de8e66c662 (link)
#134412 small borrowck cleanup f828977cd00d62c68a2afa2e41fd0015086689e1 (link)

previous master: 604d6691d9

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 (f23a80a): 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)

Results (primary 3.8%, secondary 1.1%)

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.8% [3.8%, 3.8%] 1
Regressions ❌
(secondary)
3.9% [2.4%, 5.5%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-3.7%, -2.2%] 2
All ❌✅ (primary) 3.8% [3.8%, 3.8%] 1

Cycles

Results (secondary -2.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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% [-3.3%, -2.6%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 768.397s -> 770.185s (0.23%)
Artifact size: 330.36 MiB -> 330.28 MiB (-0.02%)

@jhpratt jhpratt deleted the rollup-4gtfd1h branch December 27, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend merged-by-bors This PR was explicitly merged by bors. 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.