-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.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.
Description
PR #70946 introduces new clashing_extern_decl lint which causes incorrect warning even when two extern functions are ABI compatible:
#![allow(dead_code)]
#[repr(transparent)]
struct T(usize);
mod a {
use super::T;
extern "C" {
fn test() -> T;
}
}
mod b {
extern "C" {
fn test() -> usize;
}
}
Some other example pairs that are ABI compatible that are incorrectly warned
fn test() -> usize
andfn test()
fn test() -> usize
andfn test() -> NonZeroUsize
fn test() -> usize
andfn test() -> Option<NonZeroUsize>
This issue has been assigned to @jumbatm via this comment.
nagisa and jumbatm
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.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.