Closed
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.