Commit graph

157730 commits

Author SHA1 Message Date
Zalathar
bba24a2ffe Don't pass (self, builder) identifiers to tool_extended! 2025-01-02 17:47:13 +11:00
Zalathar
b84c54ac87 Remove two unused parameters from tool_extended! 2025-01-02 17:47:13 +11:00
Zalathar
e76c484d6d Remove the unused extra_features field from tool_extended!
This field was introduced in #48097 to support the "clippy" feature of RLS.
2025-01-02 17:47:13 +11:00
bors
c528b8c678 Auto merge of #134907 - Kobzol:rustc-dev-guide-josh, r=ehuss
Turn rustc-dev-guide into a Josh subtree

Discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/196385-t-compiler.2Fwg-rustc-dev-guide/topic/a.20move.20to.20main.20repo.20.28rust-lang.2Frust.29).

Accompanying rustc-dev-guide PR: https://github.com/rust-lang/rustc-dev-guide/pull/2183

I didn't create a bootstrap step for rustc-dev-guide yet, because the rustc-dev-guide version that we currently use in this repo doesn't have linkcheck enabled and that fails tests.

The subtree starts with commit [ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e](ad93c5f1c4).

What I did:
```
export DIR=src/doc/rustc-dev-guide

# Remove submodule
git submodule status ${DIR}
git submodule deinit ${DIR}
git rm -r --cached ${DIR}
rm -rf ${DIR}
# Remove rustc-dev-guide from .gitmodules
git commit -m"Removed `${DIR}` submodule"

# Import history with josh
git fetch https://github.com/rust-lang/rustc-dev-guide ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e
josh-filter ':prefix=src/doc/rustc-dev-guide' FETCH_HEAD
git merge --allow-unrelated FILTERED_HEAD

# A few follow-up cleanup commits
```

r? ehuss
2025-01-02 03:05:42 +00:00
Matthias Krüger
92f56fc150
Rollup merge of #134973 - ericlehong:fix-typo, r=GuillaumeGomez
Fix typos

This PR fixes typos errors in comments and docs.

Thank you very much.
2025-01-01 22:04:16 +01:00
Matthias Krüger
afdb6270ef
Rollup merge of #134967 - onur-ozkan:auto-submodule-handler, r=jieyouxu
handle submodules automatically on `doc` steps

Helps to make `doc` macros less complicated.
2025-01-01 22:04:15 +01:00
bors
372442fe5f Auto merge of #134964 - Kobzol:tidy-full-check, r=onur-ozkan
Run Python formatting check in tidy on CI

I don't think that there's a reason why we should ignore Python formatting on CI, when we already check Python lints and C++ formatting.

r? `@onur-ozkan`
2025-01-01 16:08:17 +00:00
Jakub Beránek
47e2baa1c9 Remove mention of rustc-dev-guide from toolstate 2025-01-01 17:06:58 +01:00
Jakub Beránek
5c0c0f41f4 Remove obsolete RustcGuide bootstrap step
It was not working for a long time.
2025-01-01 17:06:27 +01:00
Jakub Beránek
59d5328e0a Fix source code path in comment 2025-01-01 17:06:27 +01:00
Jakub Beránek
8decc04e75 Add rustc-dev-guide as a josh subtree 2025-01-01 17:06:11 +01:00
Jakub Beránek
ccee38a930 Removed rustc-dev-guide as a submodule 2025-01-01 17:05:53 +01:00
bors
bc3e3015b6 Auto merge of #134992 - Zalathar:rollup-pldy5w6, r=Zalathar
Rollup of 6 pull requests

Successful merges:

 - #131439 (Remove allowing static_mut_refs lint)
 - #133292 (E0277: suggest dereferencing function arguments in more cases)
 - #134877 (add suggestion for wrongly ordered format parameters)
 - #134945 (Some small nits to the borrowck suggestions for mutating a map through index)
 - #134950 (bootstrap: Overhaul and simplify the `tool_check_step!` macro)
 - #134979 (Provide structured suggestion for `impl Default` of type where all fields have defaults)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-01 08:10:15 +00:00
Stuart Cook
cf7d7f5096
Rollup merge of #134950 - Zalathar:tool-check-step, r=jieyouxu
bootstrap: Overhaul and simplify the `tool_check_step!` macro

Main changes:

- Pull most of `run` out of the macro and into a regular helper function
- Reduce the number of redundant/unnecessary macro arguments
- Switch to struct-like syntax so that optional arguments are clearer, and so that rustfmt is happy

~~The one “functional” change is that the `-check.stamp` files now get their name from the final path segment, instead of the struct name; in practice this means that they now contain more hyphens in some cases. As far as I'm aware, the exact filename doesn't matter so this should be fine.~~ (that change has been removed from this PR)
2025-01-01 16:35:31 +11:00
bors
a8953d83cf Auto merge of #134926 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

13 commits in ad2011d3bcad9f152d034faf7635c22506839d58..04d06dfe541607e6419f3d028c3f9b245f3be4d9
2024-12-20 22:44:11 UTC to 2024-12-16 18:18:21 UTC

- Update section name (rust-lang/book#4175)
- Update text to reflect the change from '&str' to 'char' in example (rust-lang/book#4173)
- Update figure number in text and file name (rust-lang/book#4172)
- Fix chapter number (rust-lang/book#4171)
- Delete unused reference (rust-lang/book#4170)
- Remove orphaned half-sentence (rust-lang/book#4169)
- Fix chapter number (rust-lang/book#4168)
- A better phrasing for generic methods. (rust-lang/book#3428)
- Fix minor grammatical error (rust-lang/book#4098)
- Update appendix-06-translation.md to add another Chinese translation. (rust-lang/book#3608)
- Change Korean translation repo to newer (rust-lang/book#3625)
- Clarify/improve readability in Ch. 02 discussion of `Result` variants (rust-lang/book#4167)
- Ch. 20: conclude §01 with a reference to the Rustonomicon (rust-lang/book#4166)

## rust-lang/nomicon

1 commits in 97e84a38c94bf9362b11284c20b2cb4adaa1e868..7ef05b9777c94836bc92f50f23e6e00981521a89
2024-12-30 10:38:10 UTC to 2024-12-30 10:38:10 UTC

- Fix URL fragment to MutexGuard's negative impl of Send (rust-lang/nomicon#472)

## rust-lang/reference

3 commits in 9f41bc11342d46544ae0732caf14ec0bcaf27376..acd6794e712d5e2ef6f5c84fb95688d32a69b816
2024-12-18 23:04:30 +0000 to 2024-12-30 22:12:57 +0000

- Revert "`coverage` attribute" (rust-lang/reference#1706)
- Document Rust 2024 match ergonomics reservations (rust-lang/reference#1702)
- Add documentation for `#[diagnostic::do_not_recommend]` (rust-lang/reference#1663)

## rust-lang/edition-guide

5 commits in bc4ce51e1d4dacb9350a92e95f6159a42de2f8c6..d56e0f3a0656b7702ca466d4b191e16c28262b82
2024-12-18 05:34:59 +0000 to 2024-12-31 20:04:52 +0000

- 2024: Document rustfmt overflow_delimited_expr (rust-lang/edition-guide#352)
- 2024: Document rustfmt fixes (rust-lang/edition-guide#351)
- Update the transitioning steps (rust-lang/edition-guide#350)
- Revert "2024: Assignment operator RHS indentation" (rust-lang/edition-guide#343)
- Revert "2024: Add chapter on single-line `where` clauses" (rust-lang/edition-guide#344)

## rust-lang/rust-by-example

1 commits in 76406337f4131253443aea0ed7e7f451b464117c..093397535b48ae13ec76bc526b7e6eb8c096a85c
2024-12-18 17:29:56 UTC to 2024-12-18 17:29:56 UTC

- Mention that you're not allowed to partially move Drop types (rust-lang/rust-by-example#1902)

## rust-lang/rustc-dev-guide

18 commits in 7f7ba48f04abc2ad25e52f30b5e2bffa286b019f..ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e
2024-12-30 09:22:22 UTC to 2024-12-17 17:00:38 UTC

- Opt into, rather than out of, linkcheck (rust-lang/rustc-dev-guide#2180)
- Remove stale implementation details of coverage instrumentation (rust-lang/rustc-dev-guide#2179)
- Remove properly tracked config file from .gitignore & add support for skipping of link-checking (rust-lang/rustc-dev-guide#2023)
- Add a couple of linkcheck exceptions: (rust-lang/rustc-dev-guide#2120)
- Add missing link for [Node] (rust-lang/rustc-dev-guide#2177)
- Fix 403 received for HEAD request (rust-lang/rustc-dev-guide#2176)
- Start using mdbook-linkcheck2 (rust-lang/rustc-dev-guide#2103)
- Document `x test --no-capture` (rust-lang/rustc-dev-guide#2174)
- Remove the `-test` suffix from normalize directives (rust-lang/rustc-dev-guide#2172)
- Rework the driver docs (rust-lang/rustc-dev-guide#2162)
- Document `forbid-output` for UI tests (rust-lang/rustc-dev-guide#2171)
- completions: Zsh is now supported (rust-lang/rustc-dev-guide#2173)
- region-outlives propagation (rust-lang/rustc-dev-guide#2169)
- compiletest: Document the `--debugger` flag (rust-lang/rustc-dev-guide#2170)
- document the public ci dashboard (rust-lang/rustc-dev-guide#2167)
- Fix trivial typo of "query-fied" (rust-lang/rustc-dev-guide#2165)
- Fix some typos (rust-lang/rustc-dev-guide#2166)
- Add suggestion for `--keep-stage 0` (rust-lang/rustc-dev-guide#2164)
2025-01-01 05:25:45 +00:00
bors
2085bce154 Auto merge of #134988 - tgross35:rollup-s59bx7c, r=tgross35
Rollup of 8 pull requests

Successful merges:

 - #132474 (Add more mailmap entries)
 - #133486 (borrowck diagnostics: make `add_move_error_suggestions` use the HIR rather than `SourceMap`)
 - #134861 (Add GUI test for item info elements color)
 - #134968 (Print how to rebless Python formatting in tidy)
 - #134971 (chore: fix typos)
 - #134972 (add .mailmap entry for myself)
 - #134974 (Revert #119515 single line where clause style guide)
 - #134975 (Revert style guide rhs break)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-01 01:34:29 +00:00
Trevor Gross
9472d32842
Rollup merge of #134975 - ehuss:revert-style-guide-rhs-break, r=compiler-errors
Revert style guide rhs break

This reverts https://github.com/rust-lang/rust/pull/132369 and https://github.com/rust-lang/rust/pull/119838. The style-guide change for indentation of rhs was not implemented in time for the 2024 style edition.
See tracking issue https://github.com/rust-lang/rust/issues/132380.

cc #134974 for the other style guide change in 2024.

r? ``@compiler-errors``
2024-12-31 18:42:26 -05:00
Trevor Gross
fee79a2900
Rollup merge of #134974 - ehuss:revert-single-line-where, r=compiler-errors
Revert #119515 single line where clause style guide

This did not get implemented for the style edition in 2024, so this PR removes it from the documentation.
See tracking issue https://github.com/rust-lang/rust/issues/132381.

This can be added back in the next edition if it gets implemented. I'm a little unclear on what the style team intends for how future changes are documented. For example, the current style-guide documented behavior that rustfmt does not support. I'm not sure who the audience for this document is, or how this is intended to stay in sync with rustfmt. For example, if I read this and assume this is how it is supposed to work, and then rustfmt breaks that, it seems like that is confusing. Similarly, if I'm staying on an older edition, this documentation would be incorrect for my crate.

Perhaps changes like this could be "teed-up" in a PR, but not merged until the edition is stabilized (similar to how the reference works)? And include notes for parts that are edition-specific (so if I am using an older edition, I can see that something is different). In general, I'm a little confused on how this is intended to work.

Reverts:

- https://github.com/rust-lang/rust/pull/119515
2024-12-31 18:42:25 -05:00
Trevor Gross
53b99dee15
Rollup merge of #134968 - Kobzol:tidy-bless-log, r=Noratrieb
Print how to rebless Python formatting in tidy

Suggested [here](https://github.com/rust-lang/rust/pull/134964#discussion_r1900124882).

r? ``@Noratrieb``
2024-12-31 18:42:24 -05:00
Weihang Lo
acb38ec197
Update cargo 2024-12-31 17:05:16 -05:00
Eric Huss
40b2cd9dde Update reference, edition-guide 2024-12-31 12:29:50 -08:00
Eric Huss
7a46c7b112 Revert "Rollup merge of #119838 - joshtriplett:style-guide-binop-indent, r=compiler-errors"
This reverts commit 36287830a2, reversing
changes made to 31026b7fe3.
2024-12-31 08:50:28 -08:00
Eric Huss
a6ba04ae6a Revert "Rollup merge of #132369 - joshtriplett:style-guide-binop-heuristic-assignment-only, r=calebcartwright"
This reverts commit 348d28052b, reversing
changes made to 526c67f37b.
2024-12-31 08:50:04 -08:00
Eric Huss
b4a092662c Revert "Rollup merge of #119515 - joshtriplett:style-guide-gat-where-clause-same-line, r=compiler-errors"
This reverts commit 4d1cce9de5, reversing
changes made to 030a12ce2b.
2024-12-31 07:57:06 -08:00
Jakub Beránek
ca8b12eb54 Print how to rebless Python formatting in tidy 2024-12-31 15:45:21 +01:00
Max Heller
17d512ab59 Use id attribute for <a> tags instead of deprecated name attribute (#2184) 2024-12-31 22:02:50 +08:00
onur-ozkan
6eb9ebf1d6 add test coverage for helpers::is_path_in_submodule
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-31 16:34:21 +03:00
Matthias Krüger
d08d132524
Rollup merge of #134918 - ChrisDenton:issue-70093, r=jieyouxu
Windows: Enable issue 70093 link tests

Tracking issue for `-Z link-native-libraries`: #134948
Tracking issue for `-Z link-directives`: #134947

`-Zlink-native-libraries=no` and `-Zlink-directives=no` *should* work on Windows, at least for msvc. The fly in ointment is that `default-linker-libraries` doesn't. On unixy platforms rustc calls another compiler which in turn calls the linker along with the default libraries. On MSVC rustc calls the linker directly therefore it would need to be the one to implement `default-linker-libraries`. Except it doesn't so we workaround that in the test by using `-C link-arg` to talk to the linker.
2024-12-31 14:30:43 +01:00
Matthias Krüger
3e888820bd
Rollup merge of #134610 - tbu-:pr_doc_target_fmt, r=Noratrieb
Format `build.toml` consistently in platform support docs

Also fix compiler team name in target tier docs.
2024-12-31 14:30:42 +01:00
onur-ozkan
b1b576da4d handle submodules automatically on doc steps
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-31 16:24:58 +03:00
Jakub Beránek
787c2a2c6a Reformat Python file 2024-12-31 13:14:04 +01:00
Jakub Beránek
bbb5ca7c79 Enable Python formatting checks in tidy on CI 2024-12-31 13:13:15 +01:00
Zalathar
66fd5340ea Use struct-like syntax in tool_check_step!
This tricks rustfmt into formatting the macro arguments as expressions, instead
of giving up and ignoring them.
2024-12-31 22:26:14 +11:00
Zalathar
774e83cea1 Make tool_check_step! always assume SourceType::InTree
All of the tools that use this macro are currently in-tree, so support for
specifying a `SourceType` was not meaningfully used. It can potentially be
re-added in the future if needed.
2024-12-31 22:12:59 +11:00
Zalathar
c59ccae739 Infer tool-check-step display name from the last path component 2024-12-31 22:12:59 +11:00
Zalathar
1afeeef77d Move most of the Step::run impl out of tool_check_step!
Ordinary code is much easier to work with than macro-generated code.
2024-12-31 22:12:59 +11:00
Jacob Pratt
3785bc26c2
Rollup merge of #134857 - compiler-errors:rustdoc-unsafe-binders, r=camelid
Unsafe binder support in rustdoc

Adds rustdoc support for unsafe binder types: `unsafe<'a> Foo<'a>`. Doesn't add json support yet.

Tracking:
* https://github.com/rust-lang/rust/issues/130516
2024-12-31 03:38:03 -05:00
Jacob Pratt
f3d404a7be
Rollup merge of #134291 - Walnut356:type_annots, r=tgross35
Use python built in type annotations in LLDB visualizer scripts

Replaces type annotation comments with python's built-in type annotations.

Built-in type annotations were added in python 3.5. LLDB [currently recommends (and as of LLVM 21, will enforce)](https://github.com/llvm/llvm-project/pull/114807) a minimum python version of 3.8. Rust's test suite also requires python 3.10.
2024-12-31 03:38:02 -05:00
Walnut
693a0d5dcc use python built in type annotations 2024-12-31 00:53:59 -06:00
bors
41b579660c Auto merge of #134952 - Zalathar:rollup-i6g97md, r=Zalathar
Rollup of 8 pull requests

Successful merges:

 - #134919 (bootstrap: Make `./x test compiler` actually run the compiler unit tests)
 - #134927 (Make slice::as_flattened_mut unstably const)
 - #134930 (ptr docs: make it clear that we are talking only about memory accesses)
 - #134932 (explicitly set float ABI for all ARM targets)
 - #134933 (Make sure we check the future type is `Sized` in `AsyncFn*`)
 - #134934 (Fix typos)
 - #134941 (compiler: Add a statement-of-intent to `rustc_abi`)
 - #134949 (Convert some `Into` impls into `From` impls)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-31 05:51:35 +00:00
ericlehong
e34465f852 Fix typos
Signed-off-by: ericlehong <193237094+ericlehong@users.noreply.github.com>
2024-12-31 12:33:36 +08:00
Stuart Cook
a777f4a793
Rollup merge of #134919 - Zalathar:x-test-compiler, r=jieyouxu
bootstrap: Make `./x test compiler` actually run the compiler unit tests

Fixes #134916.
2024-12-31 14:12:45 +11:00
bors
80f5a81df9 Auto merge of #134929 - compiler-errors:style-edition-2024, r=ytmimi
Stabilize `style_edition = "2024"` in-tree

This PR stabilizes the `style_edition` flag in rustfmt.

**Why am I doing this in-tree?** The beta release cut is imminent (according to forge, on January 3) and this is the most lightweight approach to getting this flag stable on nightly. It's imperative (as far as I can tell -- `@traviscross` can verify or disagree) that we stabilize the `style_edition` flag so that users can control their style edition separately from the edition.

I'm happy to move this PR to the rustfmt repo and subsequently prepare a subtree sync if someone on `@rust-lang/rustfmt` believes that we should get this landed on the rustfmt side then synced. If this is the right recourse, I'd like to note that this is still quite time-sensitive. However, I'm happy to dedicate time to get this done if necessary, since I'd really like to un-jeopardize the style edition.

Tracking:

- https://github.com/rust-lang/rust/issues/123799
2024-12-31 03:05:49 +00:00
Michael Goulet
aac741a465 Unsafe binder support in rustdoc 2024-12-31 01:08:43 +00:00
Michael Goulet
f694db1e28 Stabilize style_edition 2024 in-tree 2024-12-31 00:50:21 +00:00
Zalathar
796835f376 Make ./x test compiler actually run the compiler unit tests 2024-12-31 10:52:33 +11:00
bors
4e5fec2f1e Auto merge of #134757 - RalfJung:const_swap, r=scottmcm
stabilize const_swap

libs-api FCP passed in https://github.com/rust-lang/rust/issues/83163.

However, I only just realized that this actually involves an intrinsic. The intrinsic could be implemented entirely with existing stable const functionality, but we choose to make it a primitive to be able to detect more UB. So nominating for `@rust-lang/lang`  to make sure they are aware; I leave it up to them whether they want to FCP this.

While at it I also renamed the intrinsic to make the "nonoverlapping" constraint more clear.

Fixes #83163
2024-12-30 23:46:42 +00:00
Chris Denton
7d5ff8b8bd
Windows: Enable issue 70093 link tests 2024-12-30 22:52:23 +00:00
Matthias Krüger
05c0cd31e7
Rollup merge of #134924 - ranger-ross:cleanup-ci-output, r=Kobzol
ci: Cleanup docker build logs in CI

Cleaning up the CI logs to make reviewing CI failures easier. This PR adds a `::group` around the docker tag hash input which is pretty large (250+ lines) and is probably not relevant for most people.

Related to #134910 , see this [comment](https://github.com/rust-lang/rust/issues/134910#issuecomment-2565612463)
2024-12-30 19:34:57 +01:00
Matthias Krüger
b31c9d5036
Rollup merge of #134922 - ericlehong:fix/typos, r=lqd
Fix typos

This PR fixes typos errors in comments, docs and logs.

Thank you very much.
2024-12-30 19:34:57 +01:00