Skip to content

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Aug 29, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

0xdeafbeef and others added 12 commits August 6, 2025 11:55
Previously, attempting to create/truncate a file without write/append access
would result in platform-specific error messages:
 - Unix: "Invalid argument"
 - Windows: raw OS error code 87
These error codes look like system errors, which could waste hours 
of debugging for what is actually an API misuse issue.
…aheemdev

std: clarify `OpenOptions` error for create without write access

Fixes rust-lang#140621
…mulacrum

std: use a TAIT to define `SplitPaths` on UNIX

Defining `SplitPaths` as a TAIT allows using closures instead of function pointers for `split` and `map`.
…e_atomic_ptr, r=scottmcm

Stabilize `strict_provenance_atomic_ptr` feature

This closes [tracking issue](rust-lang#99108) and stabilises `AtomicPtr::{fetch_ptr_add, fetch_ptr_sub, fetch_byte_add, fetch_byte_sub, fetch_or, fetch_and, fetch_xor}`

---

EDIT: FCP completed at rust-lang#99108 (comment)
std: haiku: fix `B_FIND_PATH_IMAGE_PATH`

Fixes rust-lang#145952, which was caused by rust-lang/libc#4575

```@rustbot``` label T-libs O-haiku
…vement, r=notriddle

Improve librustdoc error when a file creation/modification failed

The message before looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/"
```

And with this change it looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8
```

r? ``@lolbinarycat``
@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 29, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 29, 2025

📌 Commit 2f674fd has been approved by matthiaskrgr

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 Aug 29, 2025
@bors
Copy link
Collaborator

bors commented Aug 29, 2025

⌛ Testing commit 2f674fd with merge a268e92...

bors added a commit that referenced this pull request Aug 29, 2025
Rollup of 6 pull requests

Successful merges:

 - #144964 (std: clarify `OpenOptions` error for create without write access)
 - #145242 (std: use a TAIT to define `SplitPaths` on UNIX)
 - #145467 (Stabilize `strict_provenance_atomic_ptr` feature)
 - #145990 (`AutoDeref::final_ty` is already resolved)
 - #145991 (std: haiku: fix `B_FIND_PATH_IMAGE_PATH`)
 - #146000 (Improve librustdoc error when a file creation/modification failed)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-msvc-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] error test:true 2.029
error[E0308]: mismatched types
    --> library\std\src\fs\tests.rs:1291:60
     |
  53 |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     |                                               ---- arguments to this enum variant are incorrect
...
1291 |     error!(c(&r).create_new(true).open(&tmpdir.join("b")), invalid_options);
     |                                                            ^^^^^^^^^^^^^^^ expected `i32`, found `&str`
     |
help: the type constructed contains `&str` due to the type of the argument passed
    --> library\std\src\fs\tests.rs:53:47
     |
  48 | / macro_rules! error {
  49 | |     ($e:expr, $s:expr) => {
  50 | |         match $e {
  51 | |             Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s),
  52 | |             Err(ref err) => {
  53 | |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     | |                                               ^^^^^^^^
...    |
  56 | |     };
  57 | | }
     | |_- in this expansion of `error!`
...
1291 |       error!(c(&r).create_new(true).open(&tmpdir.join("b")), invalid_options);
     |       -----------------------------------------------------------------------
     |       |                                                      |
     |       |                                                      this argument influences the type of `Some`
     |       in this macro invocation
note: tuple variant defined here
---

error[E0308]: mismatched types
    --> library\std\src\fs\tests.rs:1292:71
     |
  53 |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     |                                               ---- arguments to this enum variant are incorrect
...
1292 |     error!(c(&r).create(true).truncate(true).open(&tmpdir.join("b")), invalid_options);
     |                                                                       ^^^^^^^^^^^^^^^ expected `i32`, found `&str`
     |
help: the type constructed contains `&str` due to the type of the argument passed
    --> library\std\src\fs\tests.rs:53:47
     |
  48 | / macro_rules! error {
  49 | |     ($e:expr, $s:expr) => {
  50 | |         match $e {
  51 | |             Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s),
  52 | |             Err(ref err) => {
  53 | |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     | |                                               ^^^^^^^^
...    |
  56 | |     };
  57 | | }
     | |_- in this expansion of `error!`
...
1292 |       error!(c(&r).create(true).truncate(true).open(&tmpdir.join("b")), invalid_options);
     |       ----------------------------------------------------------------------------------
     |       |                                                                 |
     |       |                                                                 this argument influences the type of `Some`
     |       in this macro invocation
note: tuple variant defined here
---

error[E0308]: mismatched types
    --> library\std\src\fs\tests.rs:1293:58
     |
  53 |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     |                                               ---- arguments to this enum variant are incorrect
...
1293 |     error!(c(&r).truncate(true).open(&tmpdir.join("b")), invalid_options);
     |                                                          ^^^^^^^^^^^^^^^ expected `i32`, found `&str`
     |
help: the type constructed contains `&str` due to the type of the argument passed
    --> library\std\src\fs\tests.rs:53:47
     |
  48 | / macro_rules! error {
  49 | |     ($e:expr, $s:expr) => {
  50 | |         match $e {
  51 | |             Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s),
  52 | |             Err(ref err) => {
  53 | |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     | |                                               ^^^^^^^^
...    |
  56 | |     };
  57 | | }
     | |_- in this expansion of `error!`
...
1293 |       error!(c(&r).truncate(true).open(&tmpdir.join("b")), invalid_options);
     |       ---------------------------------------------------------------------
     |       |                                                    |
     |       |                                                    this argument influences the type of `Some`
     |       in this macro invocation
note: tuple variant defined here
---

error[E0308]: mismatched types
    --> library\std\src\fs\tests.rs:1294:56
     |
  53 |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     |                                               ---- arguments to this enum variant are incorrect
...
1294 |     error!(c(&r).create(true).open(&tmpdir.join("b")), invalid_options);
     |                                                        ^^^^^^^^^^^^^^^ expected `i32`, found `&str`
     |
help: the type constructed contains `&str` due to the type of the argument passed
    --> library\std\src\fs\tests.rs:53:47
     |
  48 | / macro_rules! error {
  49 | |     ($e:expr, $s:expr) => {
  50 | |         match $e {
  51 | |             Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s),
  52 | |             Err(ref err) => {
  53 | |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     | |                                               ^^^^^^^^
...    |
  56 | |     };
  57 | | }
     | |_- in this expansion of `error!`
...
1294 |       error!(c(&r).create(true).open(&tmpdir.join("b")), invalid_options);
     |       -------------------------------------------------------------------
     |       |                                                  |
     |       |                                                  this argument influences the type of `Some`
     |       in this macro invocation
note: tuple variant defined here
---

error[E0308]: mismatched types
    --> library\std\src\fs\tests.rs:1306:71
     |
  53 |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     |                                               ---- arguments to this enum variant are incorrect
...
1306 |     error!(c(&a).create(true).truncate(true).open(&tmpdir.join("d")), invalid_options);
     |                                                                       ^^^^^^^^^^^^^^^ expected `i32`, found `&str`
     |
help: the type constructed contains `&str` due to the type of the argument passed
    --> library\std\src\fs\tests.rs:53:47
     |
  48 | / macro_rules! error {
  49 | |     ($e:expr, $s:expr) => {
  50 | |         match $e {
  51 | |             Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s),
  52 | |             Err(ref err) => {
  53 | |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     | |                                               ^^^^^^^^
...    |
  56 | |     };
  57 | | }
     | |_- in this expansion of `error!`
...
1306 |       error!(c(&a).create(true).truncate(true).open(&tmpdir.join("d")), invalid_options);
     |       ----------------------------------------------------------------------------------
     |       |                                                                 |
     |       |                                                                 this argument influences the type of `Some`
     |       in this macro invocation
note: tuple variant defined here
---

error[E0308]: mismatched types
    --> library\std\src\fs\tests.rs:1307:58
     |
  53 |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     |                                               ---- arguments to this enum variant are incorrect
...
1307 |     error!(c(&a).truncate(true).open(&tmpdir.join("d")), invalid_options);
     |                                                          ^^^^^^^^^^^^^^^ expected `i32`, found `&str`
     |
help: the type constructed contains `&str` due to the type of the argument passed
    --> library\std\src\fs\tests.rs:53:47
     |
  48 | / macro_rules! error {
  49 | |     ($e:expr, $s:expr) => {
  50 | |         match $e {
  51 | |             Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s),
  52 | |             Err(ref err) => {
  53 | |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     | |                                               ^^^^^^^^
...    |
  56 | |     };
  57 | | }
     | |_- in this expansion of `error!`
...
1307 |       error!(c(&a).truncate(true).open(&tmpdir.join("d")), invalid_options);
     |       ---------------------------------------------------------------------
     |       |                                                    |
     |       |                                                    this argument influences the type of `Some`
     |       in this macro invocation
note: tuple variant defined here
---

error[E0308]: mismatched types
    --> library\std\src\fs\tests.rs:1313:72
     |
  53 |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     |                                               ---- arguments to this enum variant are incorrect
...
1313 |     error!(c(&ra).create(true).truncate(true).open(&tmpdir.join("e")), invalid_options);
     |                                                                        ^^^^^^^^^^^^^^^ expected `i32`, found `&str`
     |
help: the type constructed contains `&str` due to the type of the argument passed
    --> library\std\src\fs\tests.rs:53:47
     |
  48 | / macro_rules! error {
  49 | |     ($e:expr, $s:expr) => {
  50 | |         match $e {
  51 | |             Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s),
  52 | |             Err(ref err) => {
  53 | |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     | |                                               ^^^^^^^^
...    |
  56 | |     };
  57 | | }
     | |_- in this expansion of `error!`
...
1313 |       error!(c(&ra).create(true).truncate(true).open(&tmpdir.join("e")), invalid_options);
     |       -----------------------------------------------------------------------------------
     |       |                                                                  |
     |       |                                                                  this argument influences the type of `Some`
     |       in this macro invocation
note: tuple variant defined here
---

error[E0308]: mismatched types
    --> library\std\src\fs\tests.rs:1314:59
     |
  53 |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     |                                               ---- arguments to this enum variant are incorrect
...
1314 |     error!(c(&ra).truncate(true).open(&tmpdir.join("e")), invalid_options);
     |                                                           ^^^^^^^^^^^^^^^ expected `i32`, found `&str`
     |
help: the type constructed contains `&str` due to the type of the argument passed
    --> library\std\src\fs\tests.rs:53:47
     |
  48 | / macro_rules! error {
  49 | |     ($e:expr, $s:expr) => {
  50 | |         match $e {
  51 | |             Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s),
  52 | |             Err(ref err) => {
  53 | |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     | |                                               ^^^^^^^^
...    |
  56 | |     };
  57 | | }
     | |_- in this expansion of `error!`
...
1314 |       error!(c(&ra).truncate(true).open(&tmpdir.join("e")), invalid_options);
     |       ----------------------------------------------------------------------
     |       |                                                     |
     |       |                                                     this argument influences the type of `Some`
     |       in this macro invocation
note: tuple variant defined here
---

error[E0308]: mismatched types
    --> library\std\src\fs\tests.rs:1320:56
     |
  53 |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     |                                               ---- arguments to this enum variant are incorrect
...
1320 |     error!(blank.create(true).open(&tmpdir.join("f")), invalid_options);
     |                                                        ^^^^^^^^^^^^^^^ expected `i32`, found `&str`
     |
help: the type constructed contains `&str` due to the type of the argument passed
    --> library\std\src\fs\tests.rs:53:47
     |
  48 | / macro_rules! error {
  49 | |     ($e:expr, $s:expr) => {
  50 | |         match $e {
  51 | |             Ok(_) => panic!("Unexpected success. Should've been: {:?}", $s),
  52 | |             Err(ref err) => {
  53 | |                 assert!(err.raw_os_error() == Some($s), "`{}` did not have a code of `{}`", err, $s)
     | |                                               ^^^^^^^^
...    |
  56 | |     };
  57 | | }
     | |_- in this expansion of `error!`
...
1320 |       error!(blank.create(true).open(&tmpdir.join("f")), invalid_options);
     |       -------------------------------------------------------------------
     |       |                                                  |
     |       |                                                  this argument influences the type of `Some`
     |       in this macro invocation
note: tuple variant defined here
---
[RUSTC-TIMING] corebenches test:true 67.184
[RUSTC-TIMING] coretests test:true 119.875
Bootstrap failed while executing `test --stage 2 --skip=compiler --skip=src`
Build completed unsuccessfully in 1:26:06
make: *** [Makefile:112: ci-msvc-py] Error 1
  local time: Fri Aug 29 22:33:09 CUT 2025
  network time: Fri, 29 Aug 2025 22:33:10 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Collaborator

bors commented Aug 29, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-unix Operating system: Unix-like rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants