-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 6 pull requests #129370
Rollup of 6 pull requests #129370
Conversation
The neutral element used to be positive zero, but +0 + -0 = +0 so -0 seems better indicated.
No functional changes intended. Adapts llvm-wrapper for the LLVM commits llvm/llvm-project@0f22d47 and llvm/llvm-project@d6d8243.
Changes `.unwrap()`s to `?` to avoid ICEs. Adds ui tests. Fixes rust-lang#129327
…ncompat, r=lcnr 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 rust-lang#68585
Fix `thread::sleep` Duration-handling for ESP-IDF Addresses the ESP-IDF specific aspect of rust-lang#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]: espressif/esp-idf#14390
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.
llvm-wrapper: adapt for LLVM 20 API changes No functional changes intended. Adapts llvm-wrapper for the LLVM commits llvm/llvm-project@0f22d47 and llvm/llvm-project@d6d8243. `@rustbot` label: +llvm-main r? `@nikic`
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 rust-lang#129362 r? `@jieyouxu`
…ompiler-errors safe transmute: gracefully bubble-up layout errors Changes `.unwrap()`s to `?` to avoid ICEs. Adds ui tests. Fixes rust-lang#129327 Tracking Issue: rust-lang#99571 r? `@compiler-errors`
@bors r+ rollup=never p=6 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 6b678c57b6 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (a32d4a0): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 5.2%, secondary -2.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 749.513s -> 750.761s (0.17%) |
Successful merges:
thread::sleep
Duration-handling for ESP-IDF #129232 (Fixthread::sleep
Duration-handling for ESP-IDF)LC_ALL=C
for all run-make tests #129363 (ForceLC_ALL=C
for all run-make tests)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup