-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
rustc incorrectly warn #[no_mangle] is not used when doing incremental build #60050
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-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.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Metadata
Metadata
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-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.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Steps to reproduce:
cdylibsrc/lib.rs:cargo build --verboserustccommand line used from above step, and run it as-isexample:
As you can see, the first time
cargo buildin step 3) has no warnings, however, step 4) causerustccomplains#[no_mangle]is unused, which isn't true.Step 4) can be replaced by:
src/lib.rs, so that it cause rebuildcargo buildagainrustc 1.35.0-nightly (70f1309 2019-04-16)