Skip to content

Move freeze_* methods to OpenOptionsExt2#153491

Open
ChrisDenton wants to merge 1 commit intorust-lang:mainfrom
ChrisDenton:openoptionsext2
Open

Move freeze_* methods to OpenOptionsExt2#153491
ChrisDenton wants to merge 1 commit intorust-lang:mainfrom
ChrisDenton:openoptionsext2

Conversation

@ChrisDenton
Copy link
Member

@ChrisDenton ChrisDenton commented Mar 6, 2026

Move the unstable freeze_last_access_time and freeze_last_write_time from OpenOptionsExt to a new OpenOptionsExt2 trait. This should fix #153486.

@rustbot rustbot added 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 Mar 6, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 6, 2026

r? @joboet

rustbot has assigned @joboet.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, joboet

@joboet
Copy link
Member

joboet commented Mar 6, 2026

r? libs-api
But I wonder whether it would make sense to retroactively make all these extension traits sealed. I can't imagine that there are too many people that implement this...

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Mar 6, 2026
@rustbot rustbot assigned Amanieu and unassigned joboet Mar 6, 2026
@Darksonn
Copy link
Member

Darksonn commented Mar 9, 2026

Is the intent to make a stable point release for this?

@jieyouxu
Copy link
Member

Given that as mentioned

As far as I can tell, crates affected by this have no way to fix this build error without a breaking change because it's impossible to provide an implementation of the unstable method freeze_last_access_time.

Nominating for 1.95 beta / 1.94.1 stable backports for T-libs/T-libs-api judgement call.
@rustbot label: +beta-nominated +stable-nominated

@rustbot rustbot added beta-nominated Nominated for backporting to the compiler in the beta channel. stable-nominated Nominated for backporting to the compiler in the stable channel. labels Mar 10, 2026
@joshtriplett
Copy link
Member

Seems reasonable. Could you please add a (non-doc) comment to OpenOptionsExt saying to add new methods to OpenOptionsExt2 instead?

@ChrisDenton
Copy link
Member Author

But I wonder whether it would make sense to retroactively make all these extension traits sealed. I can't imagine that there are too many people that implement this...

As far as I can make out so far, only tokio implements this one specifically (and only in their benchmarking). Still it is a breaking change. And ultimately my preference would be to deprecate extension traits entirely in favour of having inherent methods with portability lints to ensure their usage is properly gated. But that might be far off.

Seems reasonable. Could you please add a (non-doc) comment to OpenOptionsExt saying to add new methods to OpenOptionsExt2 instead?

@joshtriplett done.

@cuviper cuviper added beta-accepted Accepted for backporting to the compiler in the beta channel. stable-accepted Accepted for backporting to the compiler in the stable channel. labels Mar 18, 2026
@Mark-Simulacrum
Copy link
Member

I'm going to assume the beta/stable accepts are also libs-api approval for this change. I suppose it's technically non-breaking since the moved methods are unstable anyway (so just fixing).

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 22, 2026

📌 Commit fb65707 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Mar 22, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…k-Simulacrum

Move `freeze_*` methods to `OpenOptionsExt2`

Move the unstable `freeze_last_access_time` and `freeze_last_write_time` from `OpenOptionsExt` to a new `OpenOptionsExt2` trait. This should fix rust-lang#153486.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…k-Simulacrum

Move `freeze_*` methods to `OpenOptionsExt2`

Move the unstable `freeze_last_access_time` and `freeze_last_write_time` from `OpenOptionsExt` to a new `OpenOptionsExt2` trait. This should fix rust-lang#153486.
@Mark-Simulacrum Mark-Simulacrum removed the stable-nominated Nominated for backporting to the compiler in the stable channel. label Mar 22, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 22, 2026
[stable] 1.94.1 release


This backports:

* [STABLE] library: wasm32-wasip1-threads has functional pthreads #153634
* Move freeze_* methods to OpenOptionsExt2 #153491
* [Clippy] Fix ICE in match_same_arms rust-lang/rust-clippy#16685

Cargo:

* [stable 1.94] Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16777)
* Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16775)
* [stable 1.94] Update tar to 0.4.45 (rust-lang/cargo#16769)
* test: Remove unused docker ip_address (rust-lang/cargo#16636)
* Increase cache_lock test timeout (rust-lang/cargo#16545)
* chore: Updated compiler errors for Rust 1.93 (rust-lang/cargo#16543)
* test(build-std): Update error message (rust-lang/cargo#16658)
* fix: `--remap-path-scope` stabilized in 1.95-nightly (rust-lang/cargo#16536)
* fix(script): surpress `unused_features` lint for embedded (rust-lang/cargo#16714)
* test(git): Mark a test as non-deterministic (rust-lang/cargo#16706)
* test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…k-Simulacrum

Move `freeze_*` methods to `OpenOptionsExt2`

Move the unstable `freeze_last_access_time` and `freeze_last_write_time` from `OpenOptionsExt` to a new `OpenOptionsExt2` trait. This should fix rust-lang#153486.
rust-bors bot pushed a commit that referenced this pull request Mar 22, 2026
[stable] 1.94.1 release


This backports:

* [STABLE] library: wasm32-wasip1-threads has functional pthreads #153634
* Move freeze_* methods to OpenOptionsExt2 #153491
* [Clippy] Fix ICE in match_same_arms rust-lang/rust-clippy#16685

Cargo:

* [stable 1.94] Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16777)
* Fix symlink_and_directory when running in a long target dir name (rust-lang/cargo#16775)
* [stable 1.94] Update tar to 0.4.45 (rust-lang/cargo#16769)
* test: Remove unused docker ip_address (rust-lang/cargo#16636)
* Increase cache_lock test timeout (rust-lang/cargo#16545)
* chore: Updated compiler errors for Rust 1.93 (rust-lang/cargo#16543)
* test(build-std): Update error message (rust-lang/cargo#16658)
* fix: `--remap-path-scope` stabilized in 1.95-nightly (rust-lang/cargo#16536)
* fix(script): surpress `unused_features` lint for embedded (rust-lang/cargo#16714)
* test(git): Mark a test as non-deterministic (rust-lang/cargo#16706)
* test(replace): Mark a test as non-deterministic (rust-lang/cargo#16700)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…k-Simulacrum

Move `freeze_*` methods to `OpenOptionsExt2`

Move the unstable `freeze_last_access_time` and `freeze_last_write_time` from `OpenOptionsExt` to a new `OpenOptionsExt2` trait. This should fix rust-lang#153486.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
…k-Simulacrum

Move `freeze_*` methods to `OpenOptionsExt2`

Move the unstable `freeze_last_access_time` and `freeze_last_write_time` from `OpenOptionsExt` to a new `OpenOptionsExt2` trait. This should fix rust-lang#153486.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-accepted Accepted for backporting to the compiler in the beta channel. beta-nominated Nominated for backporting to the compiler in the beta channel. 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. stable-accepted Accepted for backporting to the compiler in the stable channel. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breaking change in std::os::windows::fs::OpenOptionsExt affecting 1.94.0

9 participants