Auto merge of #136000 - matthiaskrgr:rollup-j6ge32r, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #135873 (coverage: Prepare for upcoming changes to counter creation) - #135926 (Implement `needs-subprocess` directive, and cleanup a bunch of tests to use `needs-{subprocess,threads}`) - #135950 (Tidy Python improvements) - #135956 (Make `Vec::pop_if` a bit more presentable) - #135966 ([AIX] Allow different sized load and store in `tests/assembly/powerpc64-struct-abi.rs`) - #135983 (Doc difference between extend and extend_from_slice) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
6442054ed1
|
|
@ -25,6 +25,7 @@ pass the <!-- date-check: nov 2022 --> `--edition=2021` argument yourself when c
|
||||||
`rustfmt` directly.
|
`rustfmt` directly.
|
||||||
|
|
||||||
[fmt]: https://github.com/rust-dev-tools/fmt-rfcs
|
[fmt]: https://github.com/rust-dev-tools/fmt-rfcs
|
||||||
|
|
||||||
[`rustfmt`]:https://github.com/rust-lang/rustfmt
|
[`rustfmt`]:https://github.com/rust-lang/rustfmt
|
||||||
|
|
||||||
## Formatting C++ code
|
## Formatting C++ code
|
||||||
|
|
@ -40,6 +41,26 @@ When modifying that code, use this command to format it:
|
||||||
This uses a pinned version of `clang-format`, to avoid relying on the local
|
This uses a pinned version of `clang-format`, to avoid relying on the local
|
||||||
environment.
|
environment.
|
||||||
|
|
||||||
|
## Formatting and linting Python code
|
||||||
|
|
||||||
|
The Rust repository contains quite a lof of Python code. We try to keep
|
||||||
|
it both linted and formatted by the [ruff][ruff] tool.
|
||||||
|
|
||||||
|
When modifying Python code, use this command to format it:
|
||||||
|
```sh
|
||||||
|
./x test tidy --extra-checks=py:fmt --bless
|
||||||
|
```
|
||||||
|
|
||||||
|
and the following command to run lints:
|
||||||
|
```sh
|
||||||
|
./x test tidy --extra-checks=py:lint
|
||||||
|
```
|
||||||
|
|
||||||
|
This uses a pinned version of `ruff`, to avoid relying on the local
|
||||||
|
environment.
|
||||||
|
|
||||||
|
[ruff]: https://github.com/astral-sh/ruff
|
||||||
|
|
||||||
<a id="copyright"></a>
|
<a id="copyright"></a>
|
||||||
|
|
||||||
<!-- REUSE-IgnoreStart -->
|
<!-- REUSE-IgnoreStart -->
|
||||||
|
|
@ -165,4 +186,5 @@ to the compiler.
|
||||||
crate-related, often the spelling is changed to `krate`.
|
crate-related, often the spelling is changed to `krate`.
|
||||||
|
|
||||||
[tcx]: ./ty.md
|
[tcx]: ./ty.md
|
||||||
|
|
||||||
[crates]: ./crates-io.md
|
[crates]: ./crates-io.md
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,7 @@ settings:
|
||||||
- `needs-rust-lld` — ignores if the rust lld support is not enabled (`rust.lld =
|
- `needs-rust-lld` — ignores if the rust lld support is not enabled (`rust.lld =
|
||||||
true` in `config.toml`)
|
true` in `config.toml`)
|
||||||
- `needs-threads` — ignores if the target does not have threading support
|
- `needs-threads` — ignores if the target does not have threading support
|
||||||
|
- `needs-subprocess` — ignores if the target does not have subprocess support
|
||||||
- `needs-symlink` — ignores if the target does not support symlinks. This can be
|
- `needs-symlink` — ignores if the target does not support symlinks. This can be
|
||||||
the case on Windows if the developer did not enable privileged symlink
|
the case on Windows if the developer did not enable privileged symlink
|
||||||
permissions.
|
permissions.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue