about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-08-23Rollup merge of #129417 - compiler-errors:refine-err, r=lqdMatthias Krüger-20/+30
Don't trigger refinement lint if predicates reference errors Fixes #129404
2024-08-23Rollup merge of #129414 - GuillaumeGomez:fix-doc-hidden-crates, r=notriddleMatthias Krüger-3/+31
Fix extern crates not being hidden with `doc(hidden)` Fixes #126796. Only the current crate should never be stripped, any other crate should be strippable. r? ``@notriddle``
2024-08-23Rollup merge of #129400 - Amjad50:update-compiler-builtins, r=tgross35Matthias Krüger-4/+4
Update `compiler_builtins` to `0.1.120` Includes https://github.com/rust-lang/compiler-builtins/pull/672 which fixes regression issue with Apple and Windows compilers. try-job: aarch64-apple try-job: x86_64-apple-1 try-job: x86_64-msvc
2024-08-23Rollup merge of #129386 - cjgillot:local-resolved-arg, r=compiler-errorsMatthias Krüger-55/+58
Use a LocalDefId in ResolvedArg.
2024-08-23Rollup merge of #129055 - Oneirical:fortanix-fortification, r=jieyouxuMatthias Krüger-94/+105
Migrate `x86_64-fortanix-unknown-sgx-lvi` `run-make` test to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). The final Makefile! Every Makefile test is now claimed. This is difficult to test due to the uncommon architecture it is specific to. I don't think it is in the CI (I didn't find it in `jobs.yml`, but if there is a way to test it, please do. Locally, on Linux, it compiles and panics at the `llvm_filecheck` part (if I replace the `x86_64-fortanix-unknown-sgx` with `x86_64-unknown-linux-gnu`, of course), which is expected. For this reason, the Makefile and associated script have been kept, but with a leading underscore.
2024-08-23Rollup merge of #128876 - ColinFinck:rust-lld-with-runtime-dlls, ↵Matthias Krüger-13/+24
r=Kobzol,petrochenkov,jieyouxu Ship MinGW-w64 runtime DLLs along with `rust-lld.exe` for `-pc-windows-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: https://github.com/rust-lang/rustup/commit/ce3c09a0cb126e2c65a3bb2a3bbf3f098b4c23a2 Fixes #125809 try-job: dist-x86_64-mingw
2024-08-23Rollup merge of #127623 - lolbinarycat:fix_remove_dir_all, r=AmanieuMatthias Krüger-36/+153
fix: fs::remove_dir_all: treat internal ENOENT as success fixes #127576 try-job: test-various
2024-08-22Auto merge of #129413 - jieyouxu:revert-remove-dir-all, r=compiler-errorsbors-17/+103
Revert #129187 and #129302 The two PRs naively switched to `std::fs::remove_dir_all`, but failed to gracefully handle the failure case where the top-level directory entry does not exist, causing https://github.com/rust-lang/rust/pull/129187#issuecomment-2304849757 `./x clean` to fail locally when `tmp` does not exist. I plan to reland the two PRs with fixed top-level dir entry handling and more testing, but let's quickly revert to unblock people. Reverts #129187. Reverts #129302. r? bootstrap
2024-08-22Auto merge of #129410 - RalfJung:miri-sync, r=RalfJungbors-86/+658
Miri subtree update r? `@ghost`
2024-08-22Add regression test for #126796Guillaume Gomez-0/+27
2024-08-22Fix extern crates not being hidden with `doc(hidden)`Guillaume Gomez-3/+4
2024-08-22fix: fs::remove_dir_all: treat ENOENT as successbinarycat-36/+153
fixes #127576 windows implementation still needs some work
2024-08-22Don't trigger refinement lint if predicates reference errorsMichael Goulet-20/+30
2024-08-22Revert "compiletest: use `std::fs::remove_dir_all` now that it is available"许杰友 Jieyou Xu (Joe)-2/+25
This reverts commit 75ed08972703798888fceff12b3217408ca6a4b5.
2024-08-22Revert "bootstrap: fix clean's `remove_dir_all` implementation"许杰友 Jieyou Xu (Joe)-15/+78
This reverts commit 1687c55168f3837506afcd2240a8a0b6eadcc1eb.
2024-08-22Auto merge of #129257 - ChrisDenton:rename-null-descriptor, r=jieyouxubors-4/+74
Allow rust staticlib to work with MSVC's /WHOLEARCHIVE This fixes #129020 by renaming the `__NULL_IMPORT_DESCRIPTOR` to prevent conflicts. try-job: dist-i686-msvc
2024-08-22rewrite x86_64-fortanix-unknown-sgx-lvi to rmakeOneirical-94/+105
2024-08-22Auto merge of #3833 - JoJoDeveloping:tb-fix-stack-overflow, r=RalfJungbors-47/+74
Make Tree Borrows Provenance GC no longer produce stack overflows Most functions operating on Tree Borrows' trees are carefully written to not cause stack overflows due to too much recursion. The one exception is [`Tree::keep_only_needed`](https://github.com/rust-lang/miri/blob/94f5588fafcc7d59fce60ca8f7af0208e6f618d4/src/borrow_tracker/tree_borrows/tree.rs#L724), which just uses regular recursion. This function is part of the provenance GC, so it is called regularly for every allocation in the program. Tests show that this is a problem in practice. For example, the test `fill::horizontal_line` in crate `tiny-skia` (version 0.11.4) is such a test. This PR changes this, this test no now longer crashes. Instead, it succeeds (after a _long_ time).
2024-08-22Make Tree Borrows Provenance GC no longer produce stack overflowsJohannes Hostert-47/+74
2024-08-22Auto merge of #129338 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 12 commits in ba8b39413c74d08494f94a7542fe79aa636e1661..8f40fc59fb0c8df91c97405785197f3c630304ea 2024-08-16 22:48:57 +0000 to 2024-08-21 22:37:06 +0000 - Tests rely on absence of RUST_BACKTRACE (rust-lang/cargo#14441) - fix: -Cmetadata includes whether extra rustflags is same as host (rust-lang/cargo#14432) - [mdman] Normalize newlines when rendering options (rust-lang/cargo#14428) - fix: doctest respects Cargo's color options (rust-lang/cargo#14425) - Be more permissive while packaging unpublishable crates. (rust-lang/cargo#14408) - fix: Limiting pre-release match semantics to use only on `OptVersionReq::Req` (rust-lang/cargo#14412) - test: add a regression test for Issue 14409 (rust-lang/cargo#14430) - chore: update label trigger for Command-info (rust-lang/cargo#14422) - doc: add lockfile-path unstable doc section (rust-lang/cargo#14423) - doc: update lockfile-path tracking issue (rust-lang/cargo#14424) - fix: remove list owners feature of info subcommand (rust-lang/cargo#14418) - Lockfile path tests (follow-up) (rust-lang/cargo#14417)
2024-08-22Auto merge of #3832 - RalfJung:epoll-test, r=oli-obkbors-24/+4
epoll test: avoid some subtly dangling pointers Turns out `let data = MaybeUninit::<u64>::uninit().as_ptr();` is a dangling pointer, the memory gets freed at the end of that line. For these cases we don't care as we don't actually access the pointer, but let's not do such subtle things.
2024-08-22Auto merge of #129398 - matthiaskrgr:rollup-50l01ry, r=matthiaskrgrbors-85/+204
Rollup of 8 pull requests Successful merges: - #128432 (WASI: forbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}`) - #129373 (Add missing module flags for CFI and KCFI sanitizers) - #129374 (Use `assert_unsafe_precondition!` in `AsciiChar::digit_unchecked`) - #129376 (Change `assert_unsafe_precondition` docs to refer to `check_language_ub`) - #129382 (Add `const_cell_into_inner` to `OnceCell`) - #129387 (Advise against removing the remaining Python scripts from `tests/run-make`) - #129388 (Do not rely on names to find lifetimes.) - #129395 (Pretty-print own args of existential projections (dyn-Trait w/ GAT constraints)) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-22Update `compiler_builtins` to `0.1.120`Amjad Alsharafi-4/+4
Signed-off-by: Amjad Alsharafi <26300843+Amjad50@users.noreply.github.com>
2024-08-22Rollup merge of #129395 - fmease:pp-dyn-w-gat, r=compiler-errorsMatthias Krüger-20/+50
Pretty-print own args of existential projections (dyn-Trait w/ GAT constraints) Previously we would just drop them. This bug isn't that significant as it can only be triggered by user code that constrains GATs inside trait object types which is currently gated under the interim feature `generic_associated_types_extended` (whose future is questionable) or on stable if the GATs are 'disabled' in dyn-Trait via `where Self: Sized` (in which case the assoc type bindings get ignored anyway (and trigger the warn-by-default lint `unused_associated_type_bounds`)), so yeah. Affects diagnostic output and output of `std::any::type_name{_of_val}`.
2024-08-22Rollup merge of #129388 - cjgillot:region-def-id, r=compiler-errorsMatthias Krüger-39/+19
Do not rely on names to find lifetimes. For some reason, we were trying to find the lifetime parameter from its name, instead of using the def_id we have. This PR uses it instead. This changes some ui tests, I think to be more sensible.
2024-08-22Rollup merge of #129387 - Zalathar:python-apologia, r=jieyouxuMatthias Krüger-3/+18
Advise against removing the remaining Python scripts from `tests/run-make` After some recent PRs (e.g. #129185), there are only two Python scripts left in `tests/run-make`. Having come so far, it's tempting to try to get rid of the remaining ones. But after trying that myself, I've come to the conclusion that it's not worth the extra hassle, especially if it means pulling in an XML-parsing crate just for one test. This PR therefore leaves behind a few signpost comments to explain why getting rid of these particular scripts has low value.
2024-08-22Rollup merge of #129382 - tgross35:once-cell-const-into-inner, r=NoratriebMatthias Krüger-1/+2
Add `const_cell_into_inner` to `OnceCell` `Cell` and `RefCell` have their `into_inner` methods const unstable. `OnceCell` has the same logic, so add it under the same gate. Tracking issue: https://github.com/rust-lang/rust/issues/78729
2024-08-22Rollup merge of #129376 - ↵Matthias Krüger-1/+1
ChaiTRex:assert_unsafe_precondition_check_language_ub, r=workingjubilee,the8472 Change `assert_unsafe_precondition` docs to refer to `check_language_ub`
2024-08-22Rollup merge of #129374 - ↵Matthias Krüger-3/+7
ChaiTRex:digit_unchecked_assert_unsafe_precondition, r=scottmcm Use `assert_unsafe_precondition!` in `AsciiChar::digit_unchecked`
2024-08-22Rollup merge of #129373 - samitolvanen:cfi-module-flags, r=compiler-errorsMatthias Krüger-0/+83
Add missing module flags for CFI and KCFI sanitizers Set the cfi-normalize-integers and kcfi-offset module flags when Control-Flow Integrity sanitizers are used, so functions generated by the LLVM backend use the same CFI/KCFI options as rustc. cfi-normalize-integers tells LLVM to also use integer normalization for generated functions when -Zsanitizer-cfi-normalize-integers is used. kcfi-offset specifies the number of prefix nops between the KCFI type hash and the function entry when -Z patchable-function-entry is used. Note that LLVM assumes all indirectly callable functions use the same number of prefix NOPs with -Zsanitizer=kcfi.
2024-08-22Rollup merge of #128432 - g0djan:godjan/wasi_prohibit_implicit_unsafe, ↵Matthias Krüger-18/+24
r=tgross35 WASI: forbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}` Part of https://github.com/rust-lang/rust/issues/127747 for WASI try-job: test-various
2024-08-22Update cargoWeihang Lo-0/+0
2024-08-22Auto merge of #129365 - matthiaskrgr:rollup-ebwx6ya, r=matthiaskrgrbors-368/+987
Rollup of 9 pull requests Successful merges: - #127279 (use old ctx if has same expand environment during decode span) - #127945 (Implement `debug_more_non_exhaustive`) - #128941 ( Improve diagnostic-related lints: `untranslatable_diagnostic` & `diagnostic_outside_of_impl`) - #129070 (Point at explicit `'static` obligations on a trait) - #129187 (bootstrap: fix clean's remove_dir_all implementation) - #129231 (improve submodule updates) - #129264 (Update `library/Cargo.toml` in weekly job) - #129284 (rustdoc: animate the `:target` highlight) - #129302 (compiletest: use `std::fs::remove_dir_all` now that it is available) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-22Pretty-print own args of existential projectionsLeón Orell Valerian Liehr-20/+50
2024-08-22Do not rely on names to find lifetimes.Camille GILLOT-39/+19
2024-08-22Advise against removing `run-make/libtest-junit/validate_junit.py`Zalathar-0/+10
Trying to get rid of this Python script looks tempting, because it's currently the only Python script in the whole `run-make` suite that we actually run. But getting rid of it would require pulling in a Rust crate to parse XML instead, and that's probably not worth the extra hassle for a relatively-minor test.
2024-08-22Rename `foo.py` to `my_gdb_script.py`Zalathar-2/+2
This makes it easier for maintainers to see what the Python script is for.
2024-08-22Explain the `run-make/debugger-visualizer-dep-info` Python scriptZalathar-1/+6
2024-08-22Use a LocalDefId in ResolvedArg.Camille GILLOT-55/+58
2024-08-21Add `const_cell_into_inner` to `OnceCell`Trevor Gross-1/+2
`Cell` and `RefCell` have their `into_inner` methods const unstable. `OnceCell` has the same logic, so add it under the same gate. Tracking issue: https://github.com/rust-lang/rust/issues/78729
2024-08-21Change `assert_unsafe_precondition` docs to refer to `check_language_ub`Chai T. Rex-1/+1
2024-08-21Auto merge of #129370 - matthiaskrgr:rollup-g9117ee, r=matthiaskrgrbors-58/+250
Rollup of 6 pull requests Successful merges: - #128727 (bump conflicting_repr_hints lint to be shown in dependencies) - #129232 (Fix `thread::sleep` Duration-handling for ESP-IDF) - #129321 (Change neutral element of <fNN as iter::Sum> to neg_zero) - #129353 (llvm-wrapper: adapt for LLVM 20 API changes) - #129363 (Force `LC_ALL=C` for all run-make tests) - #129364 (safe transmute: gracefully bubble-up layout errors) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-21Use `assert_unsafe_precondition!` in `AsciiChar::digit_unchecked`Chai T. Rex-3/+7
2024-08-21Add missing module flags for CFI and KCFI sanitizersSami Tolvanen-0/+83
Set the cfi-normalize-integers and kcfi-offset module flags when Control-Flow Integrity sanitizers are used, so functions generated by the LLVM backend use the same CFI/KCFI options as rustc. cfi-normalize-integers tells LLVM to also use integer normalization for generated functions when -Zsanitizer-cfi-normalize-integers is used. kcfi-offset specifies the number of prefix nops between the KCFI type hash and the function entry when -Z patchable-function-entry is used. Note that LLVM assumes all indirectly callable functions use the same number of prefix NOPs with -Zsanitizer=kcfi.
2024-08-21Rollup merge of #129364 - jswrenn:transmute-layout-errs, r=compiler-errorsMatthias Krüger-49/+121
safe transmute: gracefully bubble-up layout errors Changes `.unwrap()`s to `?` to avoid ICEs. Adds ui tests. Fixes #129327 Tracking Issue: https://github.com/rust-lang/rust/issues/99571 r​? `@compiler-errors`
2024-08-21Rollup merge of #129363 - Urgau:run-make-lc_all-c, r=jieyouxuMatthias Krüger-0/+2
Force `LC_ALL=C` for all run-make tests This PR adds `LC_ALL=C` for all run-make tests so that they become locale independent. Fixes #129362 r? `@jieyouxu`
2024-08-21Rollup merge of #129353 - krasimirgg:llvm20key, r=nikicMatthias Krüger-0/+11
llvm-wrapper: adapt for LLVM 20 API changes No functional changes intended. Adapts llvm-wrapper for the LLVM commits https://github.com/llvm/llvm-project/commit/0f22d47a7a1f70ec77ea8ccdf08a6487827937db and https://github.com/llvm/llvm-project/commit/d6d8243dcd4ea768549904036ed31b8e59e14c73. `@rustbot` label: +llvm-main r? `@nikic`
2024-08-21Rollup merge of #129321 - krtab:float_sum, r=workingjubileeMatthias Krüger-2/+30
Change neutral element of <fNN as iter::Sum> to neg_zero The neutral element used to be positive zero, but +0 + -0 = +0 so -0 seems better indicated.
2024-08-21Rollup merge of #129232 - ivmarkov:master, r=workingjubileeMatthias Krüger-6/+24
Fix `thread::sleep` Duration-handling for ESP-IDF Addresses the ESP-IDF specific aspect of https://github.com/rust-lang/rust/issues/129212 #### A short summary of the problems addressed by this PR: ================================================ 1. **Problem 1** - the current implementation of `std::thread::sleep` does not properly round up the passed `Duration` As per the documentation of `std::thread::sleep`, the implementation should sleep _at least_ for the provided duration, but not less. Since the minimum supported resolution of the `usleep` syscall which is used with ESP-IDF is one microsecond, this means that we need to round-up any sub-microsecond nanos to one microsecond. Moreover, in the edge case where the user had passed a duration of < 1000 nanos (i.e. less than one microsecond), the current implementation will _not_ sleep _at all_. This is addressed by this PR. 2. **Problem 2** - the implementation of `usleep` on the ESP-IDF can overflow if the passed number of microseconds is >= `u32::MAX - 1_000_000` This is also addressed by this PR. Extra details for Problem 2: `u32::MAX - 1_000_000` is chosen to accommodate for the longest possible systick on the ESP IDF which is 1000ms. The systick duration is selected when compiling the ESP IDF FreeRTOS task scheduler itself, so we can't know it from within `STD`. The default systick duration is 10ms, and might be lowered down to 1ms. (Making it longer I have never seen, but in theory it can go up to a 1000ms max, even if obviously a one second systick is unrealistic - but we are paranoid in the PR.) While the overflow is reported upstream in the ESP IDF repo[^1], I still believe we should workaround it in the Rust wrappers as well, because it might take time until it is fixed, and they might not fix it for all released ESP IDF versions. For big durations, rather than calling `usleep` repeatedly on the ESP-IDF in chunks of `u32::MAX - 1_000_000`us, it might make sense to call instead with 1_000_000us (one second) as this is the max period that seems to be agreed upon as a safe max period in the `usleep` POSIX spec. On the other hand, that might introduce less precision (as we need to call more times `usleep` in a loop) and, we would be fighting a theoretical problem only, as I have big doubts the ESP IDF will stop supporting durations higher than 1_000_000us - ever - because of backwards compatibility with code which already calls `usleep` on the ESP IDF with bigger durations. [^1]: https://github.com/espressif/esp-idf/issues/14390
2024-08-21Rollup merge of #128727 - RalfJung:conflicting-repr-future-incompat, r=lcnrMatthias Krüger-1/+62
bump conflicting_repr_hints lint to be shown in dependencies This has been a future compatibility lint for years, let's bump it up to be shown in dependencies (so that hopefully we can then make it a hard error fairly soon). Cc https://github.com/rust-lang/rust/issues/68585