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 9 pull requests #134411

Closed
wants to merge 26 commits into from
Closed

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Dec 17, 2024

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ehuss and others added 26 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.
since drain-on-drop behavior was removed those bounds
no longer serve a purpose
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 <[email protected]>
Add a range argument to vec.extract_if

tracking issue: rust-lang#43244

This adds the range argument requested in rust-lang#43244 (comment)
…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.
Update books

## rust-lang/book

21 commits in 9900d976bbfecf4e8124da54351a9ad85ee3c7f3..ad2011d3bcad9f152d034faf7635c22506839d58
2024-12-16 16:11:34 UTC to 2024-12-05 19:19:24 UTC

- Ch. 10: clarify note about compiler errors and `'static` (rust-lang/book#4164)
- Introduce `let`-`else` statement (rust-lang/book#3702)
- Fix misleading explanation of comma in `$(),*` (rust-lang/book#3800)
- ch18-03: Matching Named Variables: mention `if let`/`while let` (rust-lang/book#3110)
- Ch. 4: Rephrase/clarify paragraph on reference scope (rust-lang/book#3688)
- Simplify note about functions in ch13-01-closures.md (rust-lang/book#3699)
- fix: make the reason more understandable (rust-lang/book#4074)
- Fixed grammatical error in the comment on line 22 (rust-lang/book#3180)
- ch17-02: Monomorphization applies to generics in general  (rust-lang/book#3367)
- Ch. 21: Use `Vec::drain` to teach alternatives to `Option` (rust-lang/book#4159)
- fix(typo): correct punctuation in ch15-06-reference-cycles.md (rust-lang/book#4155)
- Ch. 20: show both `impl Fn` and `Box<dyn Fn>` (rust-lang/book#4152)
- Add `use super::*;` to unit-test examples. (rust-lang/book#4151)
- Remove emphasis on four-space indents (rust-lang/book#4150)
- Fix `.git-blame-ignore-revs` file (rust-lang/book#4149)
- Rust 2024: distinguish `unsafe fn` vs. `unsafe` blocks (rust-lang/book#4148)
- Update README.md typo (rust-lang/book#4146)
- Ch. 15.5: account for improved error message (rust-lang/book#4142)
- Document use of rustfmt and dprint for formatting (rust-lang/book#4138)
- tools: fix nostarch build reference to mdbook-trpl (rust-lang/book#4137)
- Revise sentence to not refer to two subjects as it (rust-lang/book#4136)

## rust-lang/edition-guide

4 commits in 128669297c8a7fdf771042eaec18b8adfaeaf0cd..f56c9ae2d5b4344367e96513aea9eafb33c897e4
2024-12-10 21:29:01 UTC to 2024-12-04 21:24:35 UTC

- Show tail expression temporary example that fails in 2024 (rust-lang/edition-guide#345)
- Add more triagebot labeling support (rust-lang/edition-guide#346)
- 2024: Assignment operator RHS indentation (rust-lang/edition-guide#341)
- 2024: Add chapter on single-line `where` clauses (rust-lang/edition-guide#340)

## rust-lang/nomicon

1 commits in 0674321898cd454764ab69702819d39a919afd68..97e84a38c94bf9362b11284c20b2cb4adaa1e868
2024-12-10 02:41:27 UTC to 2024-12-10 02:41:27 UTC

- races.md: data race -> race condition to violate memory safety (rust-lang/nomicon#470)

## rust-lang/reference

4 commits in ede56d1bbe132bac476b5029cd6d7508ca9572e9..183dd4b95f35dce35527d9fe68d869ac35e640e3
2024-12-14 21:22:49 UTC to 2024-12-06 03:21:54 UTC

- Describe async closures (rust-lang/reference#1692)
- Update closures for edition 2021 disjoint closure capturing (rust-lang/reference#1521)
- Fix paragraphs with trailing `\1` (rust-lang/reference#1696)
- Add triagebot autolabel (rust-lang/reference#1694)

## rust-lang/rust-by-example

1 commits in e1d1f2cdcee4d52b9a01ff7c448be4372a377b70..76406337f4131253443aea0ed7e7f451b464117c
2024-12-07 00:24:30 UTC to 2024-12-07 00:24:30 UTC

- Fix rust-lang#1900 (rust-lang/rust-by-example#1901)

## rust-lang/rustc-dev-guide

9 commits in b21d99b..7f7ba48f04abc2ad25e52f30b5e2bffa286b019f
2024-12-16 07:12:01 UTC to 2024-12-05 05:01:46 UTC

- Specify what a CGU is (rust-lang/rustc-dev-guide#2163)
- functionality removed from codebase (part 2) (rust-lang/rustc-dev-guide#2160)
- functionality removed from codebase (rust-lang/rustc-dev-guide#2159)
- remove polymorphization (rust-lang/rustc-dev-guide#2158)
- squashing: recommend --keep-base when squashing without a conflict (rust-lang/rustc-dev-guide#2157)
- update section even more (rust-lang/rustc-dev-guide#2156)
- extend closure constraints section (rust-lang/rustc-dev-guide#2155)
- Remove `//@ compare-output-lines-by-subset` directive (rust-lang/rustc-dev-guide#2151)
- Document `needs-target-has-atomic` directive (rust-lang/rustc-dev-guide#2154)
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.
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Dec 17, 2024
@rustbot rustbot added 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 e780f52 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 e780f52 with merge 124dab9...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 17, 2024
Rollup of 9 pull requests

Successful merges:

 - rust-lang#133265 (Add a range argument to vec.extract_if)
 - rust-lang#134202 (Remove `rustc::existing_doc_keyword` lint)
 - rust-lang#134354 (Handle fndef rendering together with signature rendering)
 - rust-lang#134365 (Rename `rustc_mir_build::build` to `builder`)
 - rust-lang#134368 (Use links to edition guide for edition migrations)
 - rust-lang#134388 (Update books)
 - rust-lang#134397 (rustc_borrowck: Suggest changing `&raw const` to `&raw mut` if applicable)
 - rust-lang#134398 (AIX: add alignment info for test)
 - rust-lang#134400 (Fix some comments related to upvars handling)

Failed merges:

 - rust-lang#134399 (Do not do if ! else, use unnegated cond and swap the branches instead)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
[TIMING] core::build_steps::tool::ToolBuild { compiler: Compiler { stage: 0, host: x86_64-pc-windows-msvc }, target: x86_64-pc-windows-msvc, tool: "linkchecker", path: "src/tools/linkchecker", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [] } -- 0.344
[TIMING] core::build_steps::tool::Linkchecker { compiler: Compiler { stage: 0, host: x86_64-pc-windows-msvc }, target: x86_64-pc-windows-msvc } -- 0.000
##[group]Testing stage0 Linkcheck (x86_64-pc-windows-msvc)
reference\expressions\closure-expr.html:195: broken link - `reference\expressions\..%5Citems%5Cfunctions.html`
reference\print.html:10769: broken link - `reference\expressions\..%5Citems%5Cfunctions.html`
number of HTML files scanned: 44047
number of HTML redirects found: 13784
number of links checked: 2385168
number of links ignored due to external: 84255
number of links ignored due to external: 84255
number of links ignored due to exceptions: 17
number of intra doc links ignored: 8
errors found: 2
NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md
found some broken links
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 1:24:40
make: *** [Makefile:106: ci-msvc-ps1] Error 1
  network time: Tue, 17 Dec 2024 09:16:14 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Contributor

bors commented Dec 17, 2024

💔 Test failed - checks-actions

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

jhpratt commented Dec 17, 2024

@bors retry

@jieyouxu
Copy link
Member

@bors r-

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 17, 2024
@jhpratt jhpratt added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. CI-spurious-fail-msvc CI spurious failure: target env msvc and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 17, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Dec 17, 2024

Genuine failure, not spurious

reference\expressions\closure-expr.html:195: broken link - `reference\expressions\..%5Citems%5Cfunctions.html`
reference\print.html:10769: broken link - `reference\expressions\..%5Citems%5Cfunctions.html`
number of HTML files scanned: 44047
number of HTML redirects found: 13784
number of links checked: 2385168
number of links ignored due to external: 84255
number of links ignored due to external: 84255
number of links ignored due to exceptions: 17
number of intra doc links ignored: 8
errors found: 2
NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md
found some broken links

@jhpratt jhpratt closed this Dec 17, 2024
@jhpratt jhpratt deleted the rollup-3ozrvej branch December 17, 2024 09:18
@jieyouxu jieyouxu removed the CI-spurious-fail-msvc CI spurious failure: target env msvc label Dec 17, 2024
@jhpratt
Copy link
Member Author

jhpratt commented Dec 17, 2024

I misread "broken link" and thought it was a linker error from msvc. Thank you!

@jieyouxu
Copy link
Member

Probably #134388

@jieyouxu jieyouxu mentioned this pull request Dec 17, 2024
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 rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.