Commit Graph

268801 Commits

Author SHA1 Message Date
Philipp Krones
375ca8d90f
Update Cargo.lock 2024-10-18 13:44:57 +02:00
Philipp Krones
849a19f242
Merge commit 'a109190d7060236e655fc75533373fa274ec5343' into clippy-subtree-update 2024-10-18 13:44:06 +02:00
bors
a109190d70 Auto merge of #13561 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2024-10-18 11:31:05 +00:00
Philipp Krones
4b5d1894db
Bump nightly version -> 2024-10-18 2024-10-18 13:26:07 +02:00
Philipp Krones
4d5eaa0344
Bump Clippy version -> 0.1.84 2024-10-18 13:25:50 +02:00
Philipp Krones
224d1e323a
Merge remote-tracking branch 'upstream/master' into rustup 2024-10-18 13:25:37 +02:00
bors
acfdb8dd1f Auto merge of #131362 - Kobzol:ci-free-runners-linux-4c, r=Mark-Simulacrum
CI: use free runners for 4-core Linux jobs

It looks like the [free runners](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories) already have the same spec as the `4c` custom "large" runner (4 cores, 16 GiB of memory, Ubuntu 20.04).

try-job: arm-android
try-job: armhf-gnu
try-job: dist-aarch64-linux
try-job: dist-android
try-job: dist-arm-linux
try-job: dist-armhf-linux
try-job: dist-armv7-linux
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-i686-linux
try-job: dist-loongarch64-linux
try-job: dist-loongarch64-musl
try-job: dist-ohos
try-job: dist-powerpc-linux
try-job: dist-powerpc64-linux
try-job: dist-powerpc64le-linux
try-job: dist-riscv64-linux
try-job: dist-s390x-linux
try-job: dist-various-1
try-job: dist-various-2
try-job: dist-x86_64-freebsd
try-job: dist-x86_64-illumos
try-job: dist-x86_64-netbsd
try-job: mingw-check
try-job: test-various
try-job: x86_64-gnu
try-job: x86_64-gnu-stable
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-debug
try-job: x86_64-gnu-nopt
2024-10-18 08:24:09 +00:00
bors
db8043bb19 Auto merge of #131869 - matthiaskrgr:rollup-xrkz174, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #131654 (Various fixes for Xous)
 - #131743 (rustc_metadata: minor tidying)
 - #131823 (Bump libc to 0.2.161)
 - #131850 (Missing parenthesis)
 - #131857 (Allow dropping dyn principal)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-18 06:03:23 +00:00
Matthias Krüger
13b398401f
Rollup merge of #131857 - WaffleLapkin:dyn-drop-principal-3, r=compiler-errors
Allow dropping dyn principal

Revival of #126660, which was a revival of #114679. Fixes #126313.

Allows dropping principal when coercing trait objects, e.g. `dyn Debug + Send` -> `dyn Send`.

cc `@compiler-errors` `@Jules-Bertholet`
r? `@lcnr`
2024-10-18 06:59:07 +02:00
Matthias Krüger
b25d266bef
Rollup merge of #131850 - lexeyOK:master, r=compiler-errors
Missing parenthesis

the line was missing closing parenthesis
2024-10-18 06:59:07 +02:00
Matthias Krüger
4e9901faa9
Rollup merge of #131823 - thesummer:bump-libc-0.2.160, r=workingjubilee
Bump libc to 0.2.161

Bumps libc to the latest release version 0.2.161 which
- includes libc support for the tier 3 RTEMS target
- fixes segfaults on 32-bit FreeBSD targets
- gets musl's `posix_spawn_file_actions_addchdir_np` for some spawn opts
2024-10-18 06:59:06 +02:00
Matthias Krüger
02cc3a6da5
Rollup merge of #131743 - tamird:find_commandline_library-tidy, r=lcnr
rustc_metadata: minor tidying

Cleaned up some code while investigating #131720.

See individual commits.
2024-10-18 06:59:05 +02:00
Matthias Krüger
994bdbb23f
Rollup merge of #131654 - betrusted-io:xous-various-fixes, r=thomcc
Various fixes for Xous

This patchset includes several fixes for Xous that have crept in over the last few months:

* The `adjust_process()` syscall was incorrect
* Warnings have started appearing in `alloc` -- adopt the same approach as wasm, until wasm figures out a workaround
* Dead code warnings have appeared in the networking code. Add `allow(dead_code)` as these structs are used as IPC values
* Add support for `args` and `env`, which have been useful for running tests
* Update `unwinding` to `0.2.3` which fixes the recent regression due to changes in `asm!()` code
2024-10-18 06:59:05 +02:00
Jules Bertholet
c4bce0b8b1 Add more tests 2024-10-18 00:33:50 +02:00
bors
d9c4b8d475 Auto merge of #131572 - cuviper:ub-index_range, r=thomcc
Avoid superfluous UB checks in `IndexRange`

`IndexRange::len` is justified as an overall invariant, and
`take_prefix` and `take_suffix` are justified by local branch
conditions. A few more UB-checked calls remain in cases that are only
supported locally by `debug_assert!`, which won't do anything in
distributed builds, so those UB checks may still be useful.

We generally expect core's `#![rustc_preserve_ub_checks]` to optimize
away in user's release builds, but the mere presence of that extra code
can sometimes inhibit optimization, as seen in #131563.
2024-10-17 22:18:24 +00:00
Jan Sommer
a09c54d4d3 Bump libc to 0.2.161 2024-10-17 23:11:45 +02:00
lexx
4ab307f9e8
Missing parenthesis
the line was missing closing parenthesis
2024-10-18 01:04:01 +05:00
bors
3ed6e3cc69 Auto merge of #131848 - matthiaskrgr:rollup-l29a75j, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #129620 (Provide a more convinient way of developing rustc on NixOS)
 - #131805 (rustc_llvm: Fix flattened CLI args)
 - #131818 (Enable XRay instrumentation for LoongArch Linux targets)
 - #131825 (SolverDelegate add assoc type for Infcx)
 - #131833 (Add `must_use` to `CommandExt::exec`)
 - #131835 (Do not run test where it cannot run)
 - #131844 (Add mailmap entry for kobzol)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-17 19:33:39 +00:00
Matthias Krüger
c9f3a7de1e
Rollup merge of #131844 - Kobzol:mailmap-kobzol, r=jieyouxu
Add mailmap entry for kobzol

Hopefully I got this right.
2024-10-17 20:47:32 +02:00
Matthias Krüger
e46d52ccda
Rollup merge of #131835 - ferrocene:amanjeev/add-missing-attribute-unwind, r=Noratrieb
Do not run test where it cannot run

This was seen on Ferrocene, where we have a custom test target that does not have unwind support
2024-10-17 20:47:32 +02:00
Matthias Krüger
372e8c11c2
Rollup merge of #131833 - c-ryan747:patch-1, r=Noratrieb
Add `must_use` to `CommandExt::exec`

[CommandExt::exec](https://fburl.com/0qhpo7nu) returns a `std::io::Error` in the case exec fails, but its not currently marked as `must_use` making it easy to accidentally ignore it.

This PR adds the `must_use` attributed here as i think it fits the definition in the guide of [When to add #[must_use]](https://std-dev-guide.rust-lang.org/policy/must-use.html#when-to-add-must_use)
2024-10-17 20:47:31 +02:00
Matthias Krüger
405eb4178e
Rollup merge of #131825 - lcnr:probe-no-more-leak-2, r=compiler-errors
SolverDelegate add assoc type for Infcx

makes writing trait bounds on it a lot nicer going forward.

r? `@compiler-errors`
2024-10-17 20:47:31 +02:00
Matthias Krüger
7dbd92fadd
Rollup merge of #131818 - heiher:loong-instrument-xray, r=jieyouxu
Enable XRay instrumentation for LoongArch Linux targets

Enable XRay instrumentation for `loongarch64-unknown-linux-{gnu, musl, ohos}` targets.
2024-10-17 20:47:30 +02:00
Matthias Krüger
db4cc00ed0
Rollup merge of #131805 - aeubanks:flat, r=durin42
rustc_llvm: Fix flattened CLI args

Fixes string manipulation errors introduced in #130446.
2024-10-17 20:47:30 +02:00
Matthias Krüger
7a7c313312
Rollup merge of #129620 - WaffleLapkin:flake, r=Noratrieb
Provide a more convinient way of developing rustc on NixOS

This PR adds envrc files which, once symlinked as  `.envrc` will activates a dev shell from `src/tools/nix-dev-shell/flake.nix` or `src/tools/nix-dev-shell/shell.nix`.

This is based on
- [Current rustc dev guide recommendation for NixOS](https://rustc-dev-guide.rust-lang.org/building/suggested.html?highlight=nix#using-nix-shell)
- https://github.com/oxalica/rust-overlay?tab=readme-ov-file#use-in-devshell-for-nix-develop
- [Nora's `x` nix package](26ea68e1a0/custom-pkgs/x)
- https://github.com/rust-lang/rustup/pull/2891
- [Direnv: use flake/nix according to availability](https://discourse.nixos.org/t/direnv-use-flake-nix-according-to-availability/29825)

This is something that I plan to use personally, but I thought it might be worth upstreaming :)

r? Noratrieb
2024-10-17 20:47:29 +02:00
Michael Goulet
e3800a1a04 Allow dropping dyn principal 2024-10-17 20:43:31 +02:00
Jakub Beránek
ab9dd3cf17 Add mailmap entry for kobzol 2024-10-17 19:43:13 +02:00
bors
86bd45979a Auto merge of #130223 - LaihoE:faster_str_replace, r=thomcc
optimize str.replace

Adds a fast path for str.replace for the ascii to ascii case. This allows for autovectorizing the code. Also should this instead be done with specialization? This way we could remove one branch. I think it is the kind of branch that is easy to predict though.

Benchmark for the fast path (replace all "a" with "b" in the rust wikipedia article, using criterion) :
| N        | Speedup | Time New (ns) | Time Old (ns) |
|----------|---------|---------------|---------------|
| 2        | 2.03    | 13.567        | 27.576        |
| 8        | 1.73    | 17.478        | 30.259        |
| 11       | 2.46    | 18.296        | 45.055        |
| 16       | 2.71    | 17.181        | 46.526        |
| 37       | 4.43    | 18.526        | 81.997        |
| 64       | 8.54    | 18.670        | 159.470       |
| 200      | 9.82    | 29.634        | 291.010       |
| 2000     | 24.34   | 81.114        | 1974.300      |
| 20000    | 30.61   | 598.520       | 18318.000     |
| 1000000  | 29.31   | 33458.000     | 980540.000    |
2024-10-17 16:20:02 +00:00
Tamir Duberstein
94a2be998d
rustc_metadata: reduce repetition 2024-10-17 11:13:28 -04:00
WANG Rui
67ed9fac55 Enable XRay instrumentation for LoongArch Linux targets 2024-10-17 22:35:51 +08:00
bors
3a85d3fa78 Auto merge of #131832 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-10-17 13:51:48 +00:00
Amanjeev Sethi
f999ab86e0 Do not run test where it cannot run
This was seen on Ferrocene, where we have a custom test target that does not have unwind support
2024-10-17 09:33:39 -04:00
Callum Ryan
9b5b607fd8
Fix must_use lint for command exec tests 2024-10-17 06:33:35 -07:00
Callum Ryan
09f75b9862
Add must_use to CommandExt::exec 2024-10-17 05:46:11 -07:00
bors
e09bf4c07a Auto merge of #18317 - lnicola:sync-from-rust, r=Veykril
minor: sync from downstream
2024-10-17 11:18:57 +00:00
bors
dae1be90ee Auto merge of #13525 - xFrednet:changelog-1-82, r=dswij
Changelog for Clippy 1.82 ✈️

```
Roses are red,
Violets are blue,
EuroRust in Austria,
    RustConf in Canada.
```

---

### The cat of this release is *Racka*:

<img height=500 src="https://github.com/user-attachments/assets/e5e3cc95-6fc3-4214-aab0-4f26e0967ae5" alt="The cats of this Clippy release" />

Cats for the next release can be nominated in the comments :D

---

changelog: none
2024-10-17 11:13:09 +00:00
Laurențiu Nicola
6e4f8fea36 Bump rustc crates 2024-10-17 13:11:12 +02:00
bors
03983fbae9 Auto merge of #131827 - matthiaskrgr:rollup-umncb57, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #128391 (Change orphan hint from "only" to "any uncovered type inside...")
 - #131583 (Setting up indirect access to external data for loongarch64-linux-{musl,ohos})
 - #131595 (rustdoc-JSON: Rename "object safe" to "dyn compatible")
 - #131748 (cleanup canonical queries)
 - #131798 (llvm: Tolerate propagated range metadata)
 - #131815 (compiler: use `is_none_or` where it is clearly better)
 - #131822 (extract `expr_assign_expected_bool_error`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-17 11:09:40 +00:00
Matthias Krüger
c7356559e5
Rollup merge of #131822 - lcnr:typeck-error-reporting, r=jieyouxu
extract `expr_assign_expected_bool_error`

moving diagnostics code out of the happy path makes it a lot easier to read imo
2024-10-17 12:07:23 +02:00
Matthias Krüger
887afd1782
Rollup merge of #131815 - workingjubilee:did-you-mean-is-none-or, r=jieyouxu
compiler: use `is_none_or` where it is clearly better

heuristic was: if it easily allows removing bangs entirely? worth it. if it requires more effort or just moves the bang? not.
2024-10-17 12:07:22 +02:00
Matthias Krüger
7ad2f60926
Rollup merge of #131798 - maurer:range-inlining, r=durin42
llvm: Tolerate propagated range metadata

llvm/llvm-project#91101 propagates range information across inlining, resulting in more metadata in this test. Tolerate the range metadata if it appears.

``@rustbot:`` label +llvm-main

r? ``@durin42``

Please wait a moment before approving, putting the llvm-main tag on it to make sure it fixes the integration test.
2024-10-17 12:07:21 +02:00
Matthias Krüger
c1f370254c
Rollup merge of #131748 - lcnr:typing-mode, r=compiler-errors
cleanup canonical queries

best reviewed commit by commit. adding `CanonicalQueryInput` to stop returning `defining_opaque_types` in query responses is the most involved change here.

r? ``@compiler-errors``
2024-10-17 12:07:21 +02:00
Matthias Krüger
f6b699c9c0
Rollup merge of #131595 - fmease:rustdoc-json-mv-obj-safe-dyn-compat, r=aDotInTheVoid
rustdoc-JSON: Rename "object safe" to "dyn compatible"

~~Blocked: Sits atop #131594. Only the last commit is relevant.~~ (rebased)

Part of #130852.

r? aDotInTheVoid or rustdoc
2024-10-17 12:07:20 +02:00
Matthias Krüger
9aee5d98cf
Rollup merge of #131583 - heiher:loong-issue-118053, r=jieyouxu
Setting up indirect access to external data for loongarch64-linux-{musl,ohos}

In issue #118053, the `loongarch64-unknown-linux-gnu` target needs indirection to access external data, and so do the `loongarch64-unknown-linux-musl` and `loongarch64-unknown-linux-ohos` targets.
2024-10-17 12:07:20 +02:00
Matthias Krüger
21c57f5490
Rollup merge of #128391 - cafce25:issue-128390, r=lcnr
Change orphan hint from "only" to "any uncovered type inside..."

Fix #128390
2024-10-17 12:07:19 +02:00
lcnr
c45073ec3e SolverDelegate add assoc type for Infcx 2024-10-17 11:38:40 +02:00
lcnr
02982f23d3 extract expr_assign_expected_bool_error 2024-10-17 11:10:01 +02:00
lcnr
6cf4cb8484 bless mir-opt tests 2024-10-17 10:22:55 +02:00
lcnr
3360c1773a move defining_opaque_types out of Canonical 2024-10-17 10:22:52 +02:00
lcnr
5834ba1ab7 remove Canonical::unchecked_rebind, it's unused 2024-10-17 09:53:27 +02:00