-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
A-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-bugCategory: bugCategory: bugS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.
Description
Problem
Sometimes, I just temporarily copy or move files to my $HOME (during a rebase or something). I did that with Cargo.toml
today.
If I try to run cargo build
in any project, it then tries to load the Cargo.toml
in the $HOME too β which is likely unrelated to the current project and is likely broken (because $HOME/src does not exist, so it can't decide what to compile there). That is quite confusing behaviour.
$ cargo new stuff
Created binary (application) `stuff` package
$ cd stuff/
$ cargo build
Compiling stuff v0.1.0 (/home/vorner/stuff)
Finished dev [unoptimized + debuginfo] target(s) in 0.15s
$ cp Cargo.toml ~
$ cargo build
error: failed to parse manifest at `/home/vorner/Cargo.toml`
Caused by:
no targets specified in the manifest
either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present
Notes
Output of cargo version
:
cargo 1.34.0-nightly (5c6aa46e6 2019-02-22)
(but happens with stable too, so I guess it's there for a while)
Metadata
Metadata
Assignees
Labels
A-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-bugCategory: bugCategory: bugS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.