-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
make Condvar, Mutex, RwLock const constructors work with the unsupported
impl
#98457
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
(rust-highfive has picked a reviewer for you, use r? to override) |
I had to add |
my bad. I meant to apply rustc_const_stable to the movable mutex/rwlock rather than the static ones. fixed that and checked that both thumbv7m and uefi work |
This is also a problem on |
r? @m-ou-se |
Now with llvm-15 being merged the bug this PR fixes is a blocker for using bugfixes from LLVM for the nvptx64-nvidia-cuda target as this target does not come with prebuilt corelib. |
I realize this bug is one that must necessarily be prioritized lower than a lot of the other great work @m-ou-se is doing. I also realize that it is not at all my place to request attention to things just because I personally care about them. But I do think it is unfortunate that Maybe there are other qualified persons that will have the bandwidth to look at this in the near future? What do you think @tmandry |
Apologies for the delay, and thanks for the reminder. (My past few weeks (months?) have been very chaotic. I'll have more time for reviewing again soon.)
Yeah that seems odd. Not sure why this is the case, but figuring that out doesn't have to block this change. @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e20fabb): 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)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
(Wanted to nominate it for backporting before I realized it would have no effect, see thread for more details) |
mark sys_common::once::generic::Once::new const-stable Attempt to address rust-lang#103191 by marking the impl const-stable. Picked the declaration from the callsite: https://github.com/rust-lang/rust/blob/21b246587c2687935bd6004ffa5dcc4f4dd6600d/library/std/src/sync/once.rs#L67 This is similar to rust-lang#98457. With this in, `python3 x.py build library/std --target x86_64-unknown-none` succeeds.
mark sys_common::once::generic::Once::new const-stable Attempt to address rust-lang/rust#103191 by marking the impl const-stable. Picked the declaration from the callsite: https://github.com/rust-lang/rust/blob/21b246587c2687935bd6004ffa5dcc4f4dd6600d/library/std/src/sync/once.rs#L67 This is similar to rust-lang/rust#98457. With this in, `python3 x.py build library/std --target x86_64-unknown-none` succeeds.
applying this patch locally to the
rust-src
component fixes #98378however, the solution seems wrong to me because PR #97791 didn't add any
rustc_const_stable
attribute to underlying implementations likestd::sys::unix::futex
, so I must be missing something about how const-stability is checked ... maybe therestricted_std
feature (gate?) has an effect?fixes #98378
fixes #98293 (probably)