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 and fn test()
fn test() -> usize and fn test() -> NonZeroUsize
fn test() -> usize and fn test() -> Option<NonZeroUsize>
This issue has been assigned to @jumbatm via this comment.
PR #70946 introduces new clashing_extern_decl lint which causes incorrect warning even when two extern functions are ABI compatible:
Some other example pairs that are ABI compatible that are incorrectly warned
fn test() -> usizeandfn test()fn test() -> usizeandfn test() -> NonZeroUsizefn test() -> usizeandfn test() -> Option<NonZeroUsize>This issue has been assigned to @jumbatm via this comment.