--emit=metadata,obj produces confusing error #76644
Labels
A-codegen
Area: Code generation
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
EDIT ehuss:
With an empty file,
foo.rs
, the commandrustc --emit=metadata,obj --crate-type=lib foo.rs
returns a confusing error:The error message should at least be a little clearer. I do not know why the combination of metadata+obj causes this error.
obj
by itself is fine, but for some reason addingmetadata
causes an error.Original bug report below:
Original title: Cargo check fails to build the same package that cargo build can with an unhelpful error
Problem
When running cargo check on my project, it errors out with the following error
a very unhelpful, cryptic error. Running with verbose gives no more info than i can get from this screenshot alone.
I have been able to notice that it only happens when compiling for the target
thumbv7em-none-eabihf
and not my native targetthumbv7em-none-eabihf
Steps
I have made a minimum example git repo
https://github.com/DusterTheFirst/cargo-check-bug-cfg-if
Possible Solution(s)
More descriptive errors than "No such file or directory" such as information about the file that is missing would help in solving the problem.
Notes
Output of
cargo version
:cargo 1.48.0-nightly (875e01232 2020-09-08)
and
cargo 1.46.0 (149022b1d 2020-07-17)
rustup show
The text was updated successfully, but these errors were encountered: