-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Problem
Some errors are not reported by cargo check.
Steps
For example, here cargo check succeeds:
% cargo check
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
% cat src/main.rs
#[no_mangle]
fn test() {}
mod foo {
#[no_mangle]
fn test() {}
}
fn main() {
println!("Hello, world!");
}But cargo build does fail:
% cargo build
Compiling asdf v0.1.0 (/tmp/asdf)
error: symbol `test` is already defined
--> src/main.rs:6:5
|
6 | fn test() {}
| ^^^^^^^^^^^^
error: aborting due to previous error
error: Could not compile `asdf`.
To learn more, run the command again with --verbose.Notes
Output of cargo version:
% cargo --version
cargo 1.34.0 (6789d8a0a 2019-04-01)
% rustc --version
rustc 1.34.2 (6c2484dc3 2019-05-13)
% rustup --version
rustup 1.18.1 (2019-04-26)
Metadata
Metadata
Assignees
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.