Skip to content

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Sep 12, 2025

This reverts #144519. The const-hacks introduces bugs, and they make the code harder to maintain. Let's wait until we can constify these functions without changing their implementation.

Fixes #146228.
Closes #144517 (since the feature is gone).
r? @tgross35
Cc @clarfonthey

This reverts commit 7ce620d.
The const-hacks introduces bugs, and they make the code harder to maintain.
Let's wait until we can constify these functions without changing their implementation.
@rustbot rustbot added O-hermit Operating System: Hermit O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 12, 2025
@workingjubilee
Copy link
Member

I effectively already reviewed the changes in detail while reviewing #146247 and I can confirm this is a revert of everything except the library/std/src/lib.rs changes which I am assuming should stay because other changes probably require those features?

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 12, 2025

📌 Commit 5d8e41b has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 12, 2025
@workingjubilee
Copy link
Member

...No, GitHub's UI just didn't load that page for some reason.

@clarfonthey
Copy link
Contributor

I would recommend not closing the tracking issue on the revert, since once #144847 lands it would be pretty easy to redo the PR without any const hacks, and I would like to do so.

jdonszelmann added a commit to jdonszelmann/rust that referenced this pull request Sep 12, 2025
…rkingjubilee

Revert "Constify SystemTime methods"

This reverts rust-lang#144519. The const-hacks introduces bugs, and they make the code harder to maintain. Let's wait until we can constify these functions without changing their implementation.

Fixes rust-lang#146228.
Closes rust-lang#144517 (since the feature is gone).
r? `@tgross35`
Cc `@clarfonthey`
@RalfJung
Copy link
Member Author

We can reopen the tracking issue then? Seems confusing to have a tracking issue for a not-currently-existing feature.

@RalfJung
Copy link
Member Author

I effectively already reviewed the changes in detail while reviewing #146247 and I can confirm this is a revert of everything except the library/std/src/lib.rs changes which I am assuming should stay because other changes probably require those features?

const_trait_impl didn't get reverted since it is now used elsewhere, yes.

bors added a commit that referenced this pull request Sep 12, 2025
Rollup of 4 pull requests

Successful merges:

 - #146389 (Convert `no_std` and `no_core` to the new attribute infrastructure)
 - #146452 (Improve `alloc::Layout` coverage)
 - #146473 (Revert "Constify SystemTime methods")
 - #146477 (Improve `core::char` coverage)

r? `@ghost`
`@rustbot` modify labels: rollup
@jdonszelmann
Copy link
Contributor

I think this broke on big ci for wasi reasons? @bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 13, 2025
@jdonszelmann
Copy link
Contributor

#146492 (comment)

@clarfonthey
Copy link
Contributor

We can reopen the tracking issue then? Seems confusing to have a tracking issue for a not-currently-existing feature.

That's how it works for RFCs and accepted ACPs, and also, most PRs, since you need to make one to get an ID to fill in.

Also, "we" means folks who have permissions to moderate on the R-L org here, so, even if I created the issue I can't reopen it, so, that is another extra thing that's necessary here. I'm mostly trying to avoid extra work, but I guess that I'm just making more work by talking about the extra work necessary, so, it doesn't really matter.

@RalfJung
Copy link
Member Author

@bors try jobs=dist-various-*

@rust-bors
Copy link

rust-bors bot commented Sep 13, 2025

Unknown value for argument "jobs". Run @bors2 help to see available commands.

@RalfJung
Copy link
Member Author

@bors try jobs=dist-various-*

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 13, 2025
Revert "Constify SystemTime methods"

try-job: dist-various-*
@RalfJung
Copy link
Member Author

@bors2 help

@rust-bors
Copy link

rust-bors bot commented Sep 13, 2025

You can use the following commands:

PR management

  • r+ [p=<priority>] [rollup=<never|iffy|maybe|always>]: Approve this PR on your behalf
    • Optionally, you can specify the <priority> of the PR and if it is eligible for rollups (<rollup>).
  • r=<user> [p=<priority>] [rollup=<never|iffy|maybe|always>]: Approve this PR on behalf of <user>
    • Optionally, you can specify the <priority> of the PR and if it is eligible for rollups (<rollup>).
    • You can pass a comma-separated list of GitHub usernames.
  • r-: Unapprove this PR
  • p=<priority> or priority=<priority>: Set the priority of this PR
  • rollup=<never|iffy|maybe|always>: Set the rollup status of the PR
  • rollup: Short for rollup=always
  • rollup-: Short for rollup=maybe
  • delegate=<try|review>: Delegate permissions for running try builds or approving to the PR author
    • try allows the PR author to start try builds.
    • review allows the PR author to both start try builds and approve the PR.
  • delegate+: Delegate approval permissions to the PR author
    • Shortcut for delegate=review
  • delegate-: Remove any previously granted permission delegation
  • try [parent=<parent>] [jobs=<jobs>]: Start a try build.
    • Optionally, you can specify a <parent> SHA with which will the PR be merged. You can specify parent=last to use the same parent SHA as the previous try build.
    • Optionally, you can select a comma-separated list of CI <jobs> to run in the try build.
  • try cancel: Cancel a running try build
  • info: Get information about the current PR

Repository management

  • treeclosed=<priority>: Close the tree for PRs with priority less than <priority>
  • treeclosed- or treeopen: Open the repository tree for merging

Meta commands

  • ping: Check if the bot is alive
  • help: Print this help message

@rust-bors
Copy link

rust-bors bot commented Sep 13, 2025

☀️ Try build successful (CI)
Build commit: 5859386 (5859386c202f3672c2772079fba37fd4f731e496, parent: 9642c0ef6749e57ce76ac153807df1cc38cd26ee)

@RalfJung
Copy link
Member Author

@bors r=workingjubilee

@bors
Copy link
Collaborator

bors commented Sep 13, 2025

📌 Commit 2baa39e has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 13, 2025
@workingjubilee
Copy link
Member

Ah, missed that. Bother.

bors added a commit that referenced this pull request Sep 13, 2025
Rollup of 8 pull requests

Successful merges:

 - #113095 (Document `become` keyword)
 - #146159 (Some hygiene doc improvements)
 - #146171 (tidy: check that error messages don't start with a capitalized letter)
 - #146419 (Update the arm-* and aarch64-* platform docs.)
 - #146473 (Revert "Constify SystemTime methods")
 - #146506 (Fix small typo in check-cfg.md)
 - #146517 (fix Condvar::wait_timeout docs)
 - #146521 (document `core::ffi::VaArgSafe`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5d56e52 into rust-lang:master Sep 14, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 14, 2025
rust-timer added a commit that referenced this pull request Sep 14, 2025
Rollup merge of #146473 - RalfJung:system-time-deconst, r=workingjubilee

Revert "Constify SystemTime methods"

This reverts #144519. The const-hacks introduces bugs, and they make the code harder to maintain. Let's wait until we can constify these functions without changing their implementation.

Fixes #146228.
Closes #144517 (since the feature is gone).
r? `@tgross35`
Cc `@clarfonthey`
@RalfJung RalfJung deleted the system-time-deconst branch September 15, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-hermit Operating System: Hermit O-SGX Target: SGX O-solid Operating System: SOLID O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SystemTime::duration_since nightly regression Tracking Issue for const SystemTime methods
7 participants