about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-19use tracked_path in rustc_fluent_macrousamoi-2/+3
2024-10-19Auto merge of #131816 - Zalathar:profiler-feature, r=Kobzolbors-4/+3
Make `profiler_builtins` an optional dependency of sysroot, not std This avoids unnecessary rebuilds of std (and the compiler) when `build.profiler` is toggled off or on. Fixes #131812. --- Background: The `profiler_builtins` crate has been an optional dependency of std (behind a cargo feature) ever since it was added back in #42433. But as far as I can tell that has only ever been a convenient way to force the crate to be built, not a genuine dependency. The side-effect of this false dependency is that toggling `build.profiler` causes a rebuild of std and the compiler, which shouldn't be necessary. This PR therefore makes `profiler_builtins` an optional dependency of the dummy sysroot crate (#108865), rather than a dependency of std. What makes this change so small is that all of the necessary infrastructure already exists. Previously, bootstrap would enable the `profiler` feature on the sysroot crate, which would forward that feature to std. Now, enabling that feature directly enables sysroot's `profiler_builtins` dependency instead. --- I believe this is more of a bootstrap change than a libs change, so tentatively: r? bootstrap
2024-10-19Auto merge of #131910 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 7 commits in 8c30ce53688e25f7e9d860b33cc914fb2957ca9a..cf53cc54bb593b5ec3dc2be4b1702f50c36d24d5 2024-10-15 16:43:16 +0000 to 2024-10-18 13:56:15 +0000 - feat: Stabilize MSRV-aware resolver config (rust-lang/cargo#14639) - Help with `[patch.crates.io]` (rust-lang/cargo#14700) - test: Migrate publish snapshotting to snapbox (rust-lang/cargo#14642) - Bump to 0.85.0; update changelog (rust-lang/cargo#14695) - Fix typo in faq.md (rust-lang/cargo#14696) - fix(registry): `HttpRegistry` `block_until_ready` returns early when work is still pending (rust-lang/cargo#14694) - fix(resolver): avoid cloning when iterating using RcVecIter (rust-lang/cargo#14690)
2024-10-18Update cargoWeihang Lo-0/+0
2024-10-18Auto merge of #131892 - flip1995:clippy-subtree-update, r=Manishearthbors-1779/+4036
Clippy subtree update One day late with the sync, as I was sick yesterday. Cargo.lock update includes Clippy version bump and some deps cleanup we did in Clippy to match more versions used in the Rust repo. r? `@Manishearth`
2024-10-18Auto merge of #131895 - jieyouxu:rollup-jyt3pic, r=jieyouxubors-121/+135
Rollup of 3 pull requests Successful merges: - #126207 (std::unix::stack_overflow::drop_handler addressing todo through libc …) - #131864 (Never emit `vptr` for empty/auto traits) - #131870 (compiletest: Store test collection context/state in two structs) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-18Rollup merge of #131870 - Zalathar:test-collector, r=jieyouxu许杰友 Jieyou Xu (Joe)-104/+98
compiletest: Store test collection context/state in two structs This is another incremental cleanup that untangles some of the parameter passing during test collection, making it easier to see which pieces of context information are read-only, and making it easier to find where each field is used.
2024-10-18Rollup merge of #131864 - lrh2000:upcast_reorder, r=WaffleLapkin许杰友 Jieyou Xu (Joe)-14/+36
Never emit `vptr` for empty/auto traits Emiting `vptr`s for empty/auto traits is unnecessary (#114942) and causes unsoundness in `trait_upcasting` (#131813). This PR should ensure that we never emit vtables for such traits. See the linked issues for more details. I'm not sure if I can add tests for the vtable layout. So this PR only adds tests for the soundness hole (i.e., the segmentation fault will disappear after this PR). Fixes #114942 Fixes #131813 Cc #65991 (tracking issue for `trait_upcasting`) r? `@WaffleLapkin` (per https://github.com/rust-lang/rust/issues/131813#issuecomment-2419969745)
2024-10-18Rollup merge of #126207 - devnexen:stack_overflow_libc_upd, r=joboet许杰友 Jieyou Xu (Joe)-3/+1
std::unix::stack_overflow::drop_handler addressing todo through libc … …update
2024-10-18Auto merge of #131841 - paulmenage:futex-abstraction, r=joboetbors-66/+83
Abstract the state type for futexes In the same way that we expose `SmallAtomic` and `SmallPrimitive` to allow Windows to use a value other than an `AtomicU32` for its futex state, switch the primary futex state type from `AtomicU32` to `futex::Futex`. The `futex::Futex` type should be usable as an atomic value with underlying primitive type equal to `futex::Primitive`. (`SmallAtomic` is also renamed to `SmallFutex`). This allows supporting the futex API on systems where the underlying kernel futex implementation requires more user state than simply an `AtomicU32`. All in-tree futex implementations simply define {`Futex`,`Primitive`} directly as {`AtomicU32`,`u32`}.
2024-10-18Hotfix TRAIT_METHODS static->constPhilipp Krones-1/+2
2024-10-18Update Cargo.lockPhilipp Krones-35/+11
2024-10-18Merge commit 'a109190d7060236e655fc75533373fa274ec5343' into ↵Philipp Krones-1745/+4025
clippy-subtree-update
2024-10-18Auto merge of #13561 - flip1995:rustup, r=flip1995bors-156/+138
Rustup r? `@ghost` changelog: none
2024-10-18Bump nightly version -> 2024-10-18Philipp Krones-1/+1
2024-10-18Bump Clippy version -> 0.1.84Philipp Krones-4/+4
2024-10-18Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-1768/+4078
2024-10-18Auto merge of #131887 - jieyouxu:rollup-ftik4ni, r=jieyouxubors-60/+287
Rollup of 9 pull requests Successful merges: - #130136 (Partially stabilize const_pin) - #131755 (Regression test for AVR `rjmp` offset) - #131774 (Add getentropy for RTEMS) - #131802 (Dont ICE when computing coverage of synthetic async closure body) - #131809 (Fix predicate signatures in retain_mut docs) - #131858 (Remove outdated documentation for `repeat_n`) - #131866 (Avoid use imports in `thread_local_inner!`) - #131874 (Default to the medium code model on OpenHarmony LoongArch target) - #131877 (checktools.sh: add link to issue for more context about disabled Miri tests) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-18Rollup merge of #131877 - RalfJung:checktools-comment, r=ChrisDenton许杰友 Jieyou Xu (Joe)-0/+4
checktools.sh: add link to issue for more context about disabled Miri tests Adds some context for the changes made in https://github.com/rust-lang/rust/pull/130072.
2024-10-18Rollup merge of #131874 - heiher:loong-ohos-medium, r=jieyouxu许杰友 Jieyou Xu (Joe)-1/+2
Default to the medium code model on OpenHarmony LoongArch target The context for this is #130266: setting the medium code model for the `loongarch64-linux-ohos` target. r? ```@jieyouxu```
2024-10-18Rollup merge of #131866 - jieyouxu:thread_local, r=jhpratt许杰友 Jieyou Xu (Joe)-22/+49
Avoid use imports in `thread_local_inner!` Previously, the use imports in `thread_local_inner!` can shadow user-provided types or type aliases of the names `Storage`, `EagerStorage`, `LocalStorage` and `LocalKey`. This PR fixes that by dropping the use imports and instead refer to the std-internal types via fully qualified paths. A basic test is added to ensure `thread_local!`s with static decls with type names that match the aforementioned std-internal type names can successfully compile. Fixes #131863.
2024-10-18Rollup merge of #131858 - ↵许杰友 Jieyou Xu (Joe)-3/+1
AnthonyMikh:AnthonyMikh/repeat_n-is-not-that-special-anymore, r=jhpratt Remove outdated documentation for `repeat_n` After #106943, which made `Take<Repeat<I>>` implement `ExactSizeIterator`, part of documentation about difference from `repeat(x).take(n)` is no longer valid. ````@rustbot```` labels: +A-docs, +A-iterators
2024-10-18Rollup merge of #131809 - collinoc:fix-retain-mut-docs, r=jhpratt许杰友 Jieyou Xu (Joe)-2/+2
Fix predicate signatures in retain_mut docs This is my first PR here so let me know if I'm doing anything wrong. The docs for `retain_mut` in `LinkedList` and `VecDeque` say the predicate takes `&e`, but it should be `&mut e` to match the actual signature. `Vec` [has it documented](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.retain_mut) correctly already.
2024-10-18Rollup merge of #131802 - compiler-errors:fnonce-coverage, r=Zalathar许杰友 Jieyou Xu (Joe)-19/+102
Dont ICE when computing coverage of synthetic async closure body I'm not totally certain if this is *right*, but at least it doesn't ICE. The issue is that we end up generating two MIR bodies for each async closure, since the `FnOnce` and `Fn`/`FnMut` implementations have different borrowing behavior of their captured variables. They should ideally both contribute to the coverage, since those MIR bodies are (*to the user*) the same code and should have no behavioral differences. This PR at least suppresses the ICEs, and then I guess worst case we can fix this the right way later. r? Zalathar or re-roll Fixes #131190
2024-10-18Rollup merge of #131774 - thesummer:rtems-add-getentropy, r=joboet许杰友 Jieyou Xu (Joe)-0/+4
Add getentropy for RTEMS RTEMS provides the `getentropy` function. Use this for providing random data. This PR enables the `getentropy` function for the RTEMS operating system to get random data. It is exposed via libc (see https://github.com/rust-lang/libc/pull/3975).
2024-10-18Rollup merge of #131755 - jfrimmel:avr-rjmp-offset-regression-test, r=jieyouxu许杰友 Jieyou Xu (Joe)-0/+107
Regression test for AVR `rjmp` offset This adds a regression test for #129301 by minimizing the code in the linked issue and putting it into a `#![no_core]`-compatible format, so that it can easily be used within an `rmake`-test. This needs to be a `rmake` test (opposed to a `tests/assembly` one), since the linked issue describes, that the problem only occurs if the code is directly compiled. Note, that `lld` is used instead of `avr-gcc`; see the [comments](https://github.com/rust-lang/rust/pull/131755#issuecomment-2416469675) [below](https://github.com/rust-lang/rust/pull/131755#issuecomment-2417160045). Closes #129301. To show, that the test actually catches the wrong behavior, this can be tested with a faulty rustc: ```bash $ rustup install nightly-2024-08-19 $ rustc +nightly-2024-08-19 -C opt-level=s -C panic=abort --target avr-unknown-gnu-atmega328 -Clinker=build/x86_64-unknown-linux-gnu/ci-llvm/bin/lld -Clink-arg='--entry=main' -o compiled tests/run-make/avr-rjmp-offset/avr-rjmp-offsets.rs $ llvm-objdump -d compiled | grep '<main>' -A 6 000110b4 <main>: 110b4: 81 e0 ldi r24, 0x1 110b6: 92 e0 ldi r25, 0x2 110b8: 85 b9 out 0x5, r24 110ba: 95 b9 out 0x5, r25 110bc: fe cf rjmp .-4 ``` One can see, that the wrong label offset (`4` instead of `6`) is produced, which would trigger an assertion in the test case. This would be a good candidate for using the `minicore` proposed in #130693. Since this is not yet merged, there is a FIXME. r? Patryk27 I think, you are the yet-to-be official target maintainer, hence I'll assign to you. `@rustbot` label +O-AVR
2024-10-18Rollup merge of #130136 - GKFX:stabilize-const-pin, r=dtolnay许杰友 Jieyou Xu (Joe)-13/+16
Partially stabilize const_pin Tracking issue #76654. Eight of these methods can be made const-stable. The remainder are blocked on #73255.
2024-10-18Dont ICE when computing coverage of synthetic async closure bodyMichael Goulet-19/+102
2024-10-18checktools.sh: add link to issue for more context about disabled Miri testsRalf Jung-0/+4
2024-10-18Add entropy source for RTEMSJan Sommer-0/+4
2024-10-18Auto merge of #131362 - Kobzol:ci-free-runners-linux-4c, r=Mark-Simulacrumbors-7/+29
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-18Default to the medium code model on OpenHarmony LoongArch targetWANG Rui-1/+2
The context for this is #130266: setting the medium code model for the 'loongarch64-linux-ohos' target.
2024-10-18Auto merge of #131869 - matthiaskrgr:rollup-xrkz174, r=matthiaskrgrbors-121/+738
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-18Rename `stamp` to `stamp_file_path`Zalathar-7/+7
2024-10-18Rename `found_paths` to `found_path_stems`Zalathar-8/+8
2024-10-18Rename `inputs` to `common_inputs_stamp`Zalathar-7/+13
The new name makes it clearer that this is a timestamp, and is collected from input files considered common to all tests.
2024-10-18Store test collection context/state in two structsZalathar-86/+73
2024-10-18Rollup merge of #131857 - WaffleLapkin:dyn-drop-principal-3, r=compiler-errorsMatthias Krüger-35/+167
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-18Rollup merge of #131850 - lexeyOK:master, r=compiler-errorsMatthias Krüger-1/+1
Missing parenthesis the line was missing closing parenthesis
2024-10-18Rollup merge of #131823 - thesummer:bump-libc-0.2.160, r=workingjubileeMatthias Krüger-3/+3
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-18Rollup merge of #131743 - tamird:find_commandline_library-tidy, r=lcnrMatthias Krüger-42/+49
rustc_metadata: minor tidying Cleaned up some code while investigating #131720. See individual commits.
2024-10-18Rollup merge of #131654 - betrusted-io:xous-various-fixes, r=thomccMatthias Krüger-40/+518
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-18Consolidate test collection state in one placeZalathar-11/+12
2024-10-18Never emit `vptr` for empty/auto traitsRuihan Li-14/+36
2024-10-18Avoid shadowing user provided types or type aliases in `thread_local!`许杰友 Jieyou Xu (Joe)-22/+49
By using qualified imports, i.e. `$crate::...::LocalKey`.
2024-10-18remove outdated documentation for `repeat_n`AnthonyMikh-3/+1
After rust/#106943 the part about `ExactSizeIterator` is no longer valid
2024-10-18Add more testsJules Bertholet-1/+85
2024-10-17Auto merge of #131572 - cuviper:ub-index_range, r=thomccbors-4/+12
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-17Bump libc to 0.2.161Jan Sommer-4/+4
2024-10-17std::unix::stack_overflow::drop_handler addressing todo through libc updateDavid Carlier-3/+1