mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-25 12:57:58 +00:00
fix new Rust 1.89 warnings (#368)
This commit is contained in:
@@ -9,7 +9,7 @@ use crate::polkavm::DummyDependency;
|
||||
pub fn create_context(
|
||||
llvm: &inkwell::context::Context,
|
||||
optimizer_settings: OptimizerSettings,
|
||||
) -> Context<DummyDependency> {
|
||||
) -> Context<'_, DummyDependency> {
|
||||
crate::initialize_llvm(crate::Target::PVM, "resolc", Default::default());
|
||||
|
||||
let module = llvm.create_module("test");
|
||||
|
||||
@@ -26,19 +26,19 @@ pub static GLOBAL_IMMUTABLE_DATA_SIZE: &str = "__immutable_data_size";
|
||||
pub static IMMUTABLE_DATA_MAX_SIZE: u32 = 4 * 1024;
|
||||
|
||||
/// Returns the immutable data global type.
|
||||
pub fn data_type(context: &inkwell::context::Context, size: u32) -> inkwell::types::ArrayType {
|
||||
pub fn data_type(context: &inkwell::context::Context, size: u32) -> inkwell::types::ArrayType<'_> {
|
||||
context
|
||||
.custom_width_int_type(revive_common::BIT_LENGTH_WORD as u32)
|
||||
.array_type(size)
|
||||
}
|
||||
|
||||
/// Returns the immutable data size global type.
|
||||
pub fn size_type(context: &inkwell::context::Context) -> inkwell::types::IntType {
|
||||
pub fn size_type(context: &inkwell::context::Context) -> inkwell::types::IntType<'_> {
|
||||
context.custom_width_int_type(revive_common::BIT_LENGTH_X32 as u32)
|
||||
}
|
||||
|
||||
/// Creates a LLVM module with the immutable data and its `size` in bytes.
|
||||
pub fn module(context: &inkwell::context::Context, size: u32) -> inkwell::module::Module {
|
||||
pub fn module(context: &inkwell::context::Context, size: u32) -> inkwell::module::Module<'_> {
|
||||
let module = context.create_module(MODULE_NAME);
|
||||
let length = size / revive_common::BYTE_LENGTH_WORD as u32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user