Rollup merge of #87092 - ricobbe:fix-raw-dylib-multiple-definitions, r=petrochenkov
Remove nondeterminism in multiple-definitions test Compare all fields in `DllImport` when sorting to avoid nondeterminism in the error for multiple inconsistent definitions of an extern function. Restore the multiple-definitions test. Resolves #87084.
This commit is contained in:
@@ -64,7 +64,7 @@ pub enum LinkagePreference {
|
||||
RequireStatic,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Encodable, Decodable, HashStable)]
|
||||
#[derive(Debug, Encodable, Decodable, HashStable)]
|
||||
pub struct NativeLib {
|
||||
pub kind: NativeLibKind,
|
||||
pub name: Option<Symbol>,
|
||||
@@ -75,7 +75,7 @@ pub struct NativeLib {
|
||||
pub dll_imports: Vec<DllImport>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Encodable, Decodable, Hash, HashStable)]
|
||||
#[derive(Clone, Debug, Encodable, Decodable, HashStable)]
|
||||
pub struct DllImport {
|
||||
pub name: Symbol,
|
||||
pub ordinal: Option<u16>,
|
||||
@@ -92,7 +92,7 @@ pub struct DllImport {
|
||||
///
|
||||
/// The usize value, where present, indicates the size of the function's argument list
|
||||
/// in bytes.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Encodable, Decodable, Hash, HashStable)]
|
||||
#[derive(Clone, PartialEq, Debug, Encodable, Decodable, HashStable)]
|
||||
pub enum DllCallingConvention {
|
||||
C,
|
||||
Stdcall(usize),
|
||||
|
||||
Reference in New Issue
Block a user