-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.Z-scriptNightly: cargo scriptNightly: cargo script
Description
Problem
When running cargo run --manifest-path foo.rs, cargo prints the following:
error: the manifest-path must be a path to a Cargo.toml file: `/Users/eric/Temp/z10/foo.rs`
This is a little confusing because --manifest-path can point to either a Cargo.toml or an embedded script file.
Steps
cargo run --manifest-path foo.rs
Possible Solution(s)
The error could say something like:
error: the manifest-path must be a path to a Cargo.toml file or a script file: `{path}`
Notes
No response
Version
cargo 1.95.0-nightly (fe2f314ae 2026-01-30)
release: 1.95.0-nightly
commit-hash: fe2f314aef06e688a9517da1ac0577bb1854d01f
commit-date: 2026-01-30
host: aarch64-apple-darwin
libgit2: 1.9.2 (sys:0.20.3 vendored)
libcurl: 8.7.1 (sys:0.4.83+curl-8.15.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 3.5.4 30 Sep 2025
os: Mac OS 26.2.0 [64-bit]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.Z-scriptNightly: cargo scriptNightly: cargo script