Introduce new fixed proc macro ABI for 1.57.0
This commit is contained in:
@@ -27,12 +27,14 @@
|
||||
pub(crate) mod abi_1_47;
|
||||
mod abi_1_54;
|
||||
mod abi_1_56;
|
||||
mod abi_1_57;
|
||||
mod abi_1_58;
|
||||
|
||||
use super::dylib::LoadProcMacroDylibError;
|
||||
pub(crate) use abi_1_47::Abi as Abi_1_47;
|
||||
pub(crate) use abi_1_54::Abi as Abi_1_54;
|
||||
pub(crate) use abi_1_56::Abi as Abi_1_56;
|
||||
pub(crate) use abi_1_57::Abi as Abi_1_57;
|
||||
pub(crate) use abi_1_58::Abi as Abi_1_58;
|
||||
use libloading::Library;
|
||||
use proc_macro_api::{ProcMacroKind, RustCInfo};
|
||||
@@ -51,6 +53,7 @@ pub(crate) enum Abi {
|
||||
Abi1_47(Abi_1_47),
|
||||
Abi1_54(Abi_1_54),
|
||||
Abi1_56(Abi_1_56),
|
||||
Abi1_57(Abi_1_57),
|
||||
Abi1_58(Abi_1_58),
|
||||
}
|
||||
|
||||
@@ -80,10 +83,14 @@ impl Abi {
|
||||
let inner = unsafe { Abi_1_54::from_lib(lib, symbol_name) }?;
|
||||
Ok(Abi::Abi1_54(inner))
|
||||
}
|
||||
(1, 56..=57) => {
|
||||
(1, 56) => {
|
||||
let inner = unsafe { Abi_1_56::from_lib(lib, symbol_name) }?;
|
||||
Ok(Abi::Abi1_56(inner))
|
||||
}
|
||||
(1, 57) => {
|
||||
let inner = unsafe { Abi_1_57::from_lib(lib, symbol_name) }?;
|
||||
Ok(Abi::Abi1_57(inner))
|
||||
}
|
||||
(1, 58..) => {
|
||||
let inner = unsafe { Abi_1_58::from_lib(lib, symbol_name) }?;
|
||||
Ok(Abi::Abi1_58(inner))
|
||||
@@ -102,6 +109,7 @@ impl Abi {
|
||||
Self::Abi1_47(abi) => abi.expand(macro_name, macro_body, attributes),
|
||||
Self::Abi1_54(abi) => abi.expand(macro_name, macro_body, attributes),
|
||||
Self::Abi1_56(abi) => abi.expand(macro_name, macro_body, attributes),
|
||||
Self::Abi1_57(abi) => abi.expand(macro_name, macro_body, attributes),
|
||||
Self::Abi1_58(abi) => abi.expand(macro_name, macro_body, attributes),
|
||||
}
|
||||
}
|
||||
@@ -111,6 +119,7 @@ impl Abi {
|
||||
Self::Abi1_47(abi) => abi.list_macros(),
|
||||
Self::Abi1_54(abi) => abi.list_macros(),
|
||||
Self::Abi1_56(abi) => abi.list_macros(),
|
||||
Self::Abi1_57(abi) => abi.list_macros(),
|
||||
Self::Abi1_58(abi) => abi.list_macros(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user