ReFS volumes on Windows Server 2022 break compilation (original) (raw)

Compiling even trivial projects (unmodified cargo new --bin) fails on ReFS disks on Windows Server 2022 (build 20348) with this error:

error: failed to create directory `<snip>\demo\target`

Caused by:
  The request is not supported. (os error 50)

ReFS vols (DevDrive) on Windows 11 seem unaffected.

This affects 1.85.0 stable, but I recall 1.84 working.

searched nightlies: from nightly-2024-12-16 to nightly-2024-12-31
regressed nightly: nightly-2024-12-23
searched commit range: 426d173...e108481
regressed commit: 00bf74d

bisected with cargo-bisect-rustc v0.6.9

Host triple: x86_64-pc-windows-msvc
Reproduce with:

cargo bisect-rustc --end=2024-12-31