-
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 8 pull requests #93499
Rollup of 8 pull requests #93499
Conversation
When `DirEntry::file_type` fails to match a known `d_type`, we should fall back to `DirEntry::metadata` instead of a bare `lstat`, because this is faster and more reliable on targets with `fstatat`.
They have been deprecated since commit 01ac5a9 which was part of the 1.49.0 release, so from the point of nightly, 11 releases ago.
Currently fails with: error: future cannot be sent between threads safely --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:21:17 | LL | assert_send(with_await()); | ^^^^^^^^^^^^ future returned by `with_await` is not `Send` | = help: the trait `Sync` is not implemented for `core::fmt::Opaque` note: future is not `Send` as this value is used across an await --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:11:37 | LL | println!("{} {:?}", "", async {}.await); | --------------------------------^^^^^^- | | | | | await occurs here, with `$crate::format_args_nl!($($arg)*)` maybe used later | has type `ArgumentV1<'_>` which is not `Send` | `$crate::format_args_nl!($($arg)*)` is later dropped here note: required by a bound in `assert_send` --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:18:24 | LL | fn assert_send(_: impl Send) {} | ^^^^ required by this bound in `assert_send` error: future cannot be sent between threads safely --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:22:17 | LL | assert_send(with_macro_call()); | ^^^^^^^^^^^^^^^^^ future returned by `with_macro_call` is not `Send` | = help: the trait `Sync` is not implemented for `core::fmt::Opaque` note: future is not `Send` as this value is used across an await --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:6:17 | LL | async {}.await | ^^^^^^ await occurs here, with `$crate::format_args_nl!($($arg)*)` maybe used later ... LL | println!("{} {:?}", "", m!()); | ----------------------------- | | | | | in this macro invocation | has type `ArgumentV1<'_>` which is not `Send` | `$crate::format_args_nl!($($arg)*)` is later dropped here note: required by a bound in `assert_send` --> $DIR/src/test/ui/fmt/format-with-yield-point.rs:18:24 | LL | fn assert_send(_: impl Send) {} | ^^^^ required by this bound in `assert_send` = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors
The documentation has been restructured to split out a brief summary paragraph out from the following elaborating paragraphs. I also attempted my hand at wording improvements and adding articles where I felt them missing, but being non-native english speaker these may need more thorough review.
Fixes a spawned task getting an unexpectedly higher priority if it's spawned by a task whose priority is temporarily boosted by a priority- protection mutex.
Improve suggestion for escaping reserved keywords r? `@davidtwco`
…lett review the total_cmp documentation The documentation has been restructured to split out a brief summary paragraph out from the following elaborating paragraphs. I also attempted my hand at wording improvements and adding articles where I felt them missing, but being non-native english speaker these may need more thorough review. cc rust-lang#72599
Accommodate yield points in the format_args expansion Fixes rust-lang#93274. For the case `println!("{} {:?}", "", async {}.await)` in the issue, the expansion before: ```rust ::std::io::_print( ::core::fmt::Arguments::new_v1( &["", " ", "\n"], &[ ::core::fmt::ArgumentV1::new(&"", ::core::fmt::Display::fmt), ::core::fmt::ArgumentV1::new(&async {}.await, ::core::fmt::Debug::fmt), ], ), ); ``` After: ```rust ::std::io::_print( ::core::fmt::Arguments::new_v1( &["", " ", "\n"], &match (&"", &async {}.await) { _args => [ ::core::fmt::ArgumentV1::new(_args.0, ::core::fmt::Display::fmt), ::core::fmt::ArgumentV1::new(_args.1, ::core::fmt::Debug::fmt), ], }, ), ); ```
…lett Document `SystemTime` platform precision Fixes rust-lang#88822
…the8472 unix: Use metadata for `DirEntry::file_type` fallback When `DirEntry::file_type` fails to match a known `d_type`, we should fall back to `DirEntry::metadata` instead of a bare `lstat`, because this is faster and more reliable on targets with `fstatat`.
…=Mark-Simulacrum Remove deprecated and unstable slice_partition_at_index functions They have been deprecated since commit 01ac5a9 which was part of the 1.49.0 release, so from the point of nightly, 11 releases ago.
core: Remove some redundant {}s from the sorting code
…-priority, r=Mark-Simulacrum kmc-solid: Inherit the calling task's base priority in `Thread::new` This PR fixes the initial priority calculation of spawned threads on the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets. Fixes a spawned task (an RTOS object on top of which threads are implemented for this target; unrelated to async tasks) getting an unexpectedly higher priority if it's spawned by a task whose priority is temporarily boosted by a priority-protection mutex.
@bors r+ rollup=never p=8 |
📌 Commit 4757a93 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (415c9f9): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Successful merges:
SystemTime
platform precision #93462 (DocumentSystemTime
platform precision)DirEntry::file_type
fallback #93471 (unix: Use metadata forDirEntry::file_type
fallback)Thread::new
#93494 (kmc-solid: Inherit the calling task's base priority inThread::new
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup