Inconsistent behavior between check and build when handling duplicate #[no_mangle] static values #63362
Labels
A-metadata
Area: Crate metadata
T-cargo
Relevant to the cargo team, which will review and decide on the PR/issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
(if this issue is better suited to rust-lang/rust, please let me know and I'll post it there)
Problem
cargo check
andcargo build
behave differently when handling two identically-named#[no_mangle]
static values defined in different modules.cargo check
incorrectly succeeds without detecting any issues, whilecargo build
correctly throws a "symbol has already been defined" error.Steps
cargo check
, observe incorrect successcargo build
, observe correct compiler errorNotes
Output of
cargo version
: cargo 1.36.0 (c4fcfb725 2019-05-15)Target: x86_64-unknown-linux-gnu
Linux distribution: Fedora 30 (fully updated)
The text was updated successfully, but these errors were encountered: