Skip to content

nightly cargo can no longer build anything due to error: failed to create directory ...\target Caused by: Incorrect function. (os error 1) #137499

@nabijaczleweli

Description

@nabijaczleweli

I tried this code:

cargo +nightly build

I expected to see this happen: the crate builds

Instead, this happened:

[some "Fetching"s happen on first run]
error: failed to create directory `s:\imgdiff-real\target`

Caused by:
  Incorrect function. (os error 1)

Happens to every crate any where I put it. I can obviously manually create this. Stable can build these too.

Meta

rustc +nightly --version --verbose:

rustc 1.87.0-nightly (46420c960 2025-02-22)
binary: rustc
commit-hash: 46420c96070b4c4bd8242f16d5806b8f26a57016
commit-date: 2025-02-22
host: x86_64-pc-windows-gnu
release: 1.87.0-nightly
LLVM version: 20.1.0

Stable still works

rustc 1.84.1 (e71f9a9a9 2025-01-27)
binary: rustc
commit-hash: e71f9a9a98b0faf423844bf0ba7438f29dc27d58
commit-date: 2025-01-27
host: x86_64-pc-windows-gnu
release: 1.84.1
LLVM version: 19.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-windows-gnuToolchain: GNU, Operating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions