diff --git a/crates/env/src/chain_extension.rs b/crates/env/src/chain_extension.rs index 5e094d55681..e9b647e95f8 100644 --- a/crates/env/src/chain_extension.rs +++ b/crates/env/src/chain_extension.rs @@ -83,7 +83,7 @@ pub struct ChainExtensionMethod { impl ChainExtensionMethod<(), (), ()> { /// Creates a new chain extension method instance. - #[inline(always)] + #[inline] pub fn build(func_id: u32) -> Self { Self { func_id, @@ -100,7 +100,7 @@ impl ChainExtensionMethod<(), O, ErrorCode> { /// `I` represents the input type of the chain extension method. /// All tuple types that may act as input parameters for the chain extension method are valid. /// Examples include `()`, `i32`, `(u8, [u8; 5], i32)`, etc. - #[inline(always)] + #[inline] pub fn input(self) -> ChainExtensionMethod where I: scale::Encode, @@ -118,7 +118,7 @@ impl ChainExtensionMethod { /// # Note /// /// This indicates that the chain extension method return value might represent a failure. - #[inline(always)] + #[inline] pub fn output_result(self) -> ChainExtensionMethod, ErrorCode> where Result: scale::Decode, @@ -138,7 +138,7 @@ impl ChainExtensionMethod { /// When using the `#[ink::chain_extension]` procedural macro to define /// this chain extension method the above constraint is enforced at /// compile time. - #[inline(always)] + #[inline] pub fn output(self) -> ChainExtensionMethod, ErrorCode> where O: scale::Decode, @@ -160,7 +160,7 @@ impl ChainExtensionMethod { /// code that represents failure. /// /// The output of the chain extension method call is always decoded and returned in this case. - #[inline(always)] + #[inline] pub fn ignore_error_code(self) -> ChainExtensionMethod { ChainExtensionMethod { func_id: self.func_id, @@ -174,7 +174,7 @@ impl ChainExtensionMethod { /// /// This will handle the returned status code and only loads and decodes the value /// returned as the output of the chain extension method call in case of success. - #[inline(always)] + #[inline] pub fn handle_error_code( self, ) -> ChainExtensionMethod> @@ -261,7 +261,7 @@ where /// # fn from_status_code(status_code: u32) -> Result<(), Self> { Ok(()) } /// # } /// ``` - #[inline(always)] + #[inline] pub fn call(self, input: &I) -> Result { ::on_instance(|instance| { EnvBackend::call_chain_extension::( @@ -315,7 +315,7 @@ where /// # fn from(_error: scale::Error) -> Self { Self {} } /// # } /// ``` - #[inline(always)] + #[inline] pub fn call(self, input: &I) -> Result { ::on_instance(|instance| { EnvBackend::call_chain_extension::( @@ -372,7 +372,7 @@ where /// # fn from_status_code(status_code: u32) -> Result<(), Self> { Ok(()) } /// # } /// ``` - #[inline(always)] + #[inline] pub fn call(self, input: &I) -> Result { ::on_instance(|instance| { EnvBackend::call_chain_extension::( @@ -421,7 +421,7 @@ where /// .ignore_error_code() /// .call(&(true, 42)); /// ``` - #[inline(always)] + #[inline] pub fn call(self, input: &I) -> O { ::on_instance(|instance| { EnvBackend::call_chain_extension::( diff --git a/crates/lang/codegen/src/generator/as_dependency/call_builder.rs b/crates/lang/codegen/src/generator/as_dependency/call_builder.rs index 94cc3f9c9f9..d98d1dc1776 100644 --- a/crates/lang/codegen/src/generator/as_dependency/call_builder.rs +++ b/crates/lang/codegen/src/generator/as_dependency/call_builder.rs @@ -188,7 +188,7 @@ impl CallBuilder<'_> { impl ::ink_lang::codegen::TraitCallForwarderFor<#trait_info> for #cb_ident { type Forwarder = <::__ink_TraitInfo as ::ink_lang::codegen::TraitCallForwarder>::Forwarder; - #[inline(always)] + #[inline] fn forward(&self) -> &Self::Forwarder { // SAFETY: // @@ -201,7 +201,7 @@ impl CallBuilder<'_> { } } - #[inline(always)] + #[inline] fn forward_mut(&mut self) -> &mut Self::Forwarder { // SAFETY: // @@ -214,14 +214,14 @@ impl CallBuilder<'_> { } } - #[inline(always)] + #[inline] fn build(&self) -> &::Builder { <_ as ::ink_lang::codegen::TraitCallBuilder>::call( >::forward(self) ) } - #[inline(always)] + #[inline] fn build_mut(&mut self) -> &mut ::Builder { diff --git a/crates/lang/codegen/src/generator/trait_def/call_builder.rs b/crates/lang/codegen/src/generator/trait_def/call_builder.rs index 11d484ccc72..d067dbb19f7 100644 --- a/crates/lang/codegen/src/generator/trait_def/call_builder.rs +++ b/crates/lang/codegen/src/generator/trait_def/call_builder.rs @@ -215,11 +215,11 @@ impl CallBuilder<'_> { E: ::ink_env::Environment, ::AccountId: ::ink_storage::traits::PackedLayout, { - #[inline(always)] + #[inline] fn pull_packed(&mut self, _at: &::ink_primitives::Key) {} - #[inline(always)] + #[inline] fn push_packed(&self, _at: &::ink_primitives::Key) {} - #[inline(always)] + #[inline] fn clear_packed(&self, _at: &::ink_primitives::Key) {} } ) diff --git a/crates/lang/src/codegen/dispatch/execution.rs b/crates/lang/src/codegen/dispatch/execution.rs index 72f1c05c22d..28d28e0879b 100644 --- a/crates/lang/src/codegen/dispatch/execution.rs +++ b/crates/lang/src/codegen/dispatch/execution.rs @@ -220,12 +220,12 @@ impl ConstructorReturnType for private::Seal { type Error = Infallible; type ReturnValue = (); - #[inline(always)] + #[inline] fn as_result(&self) -> Result<&C, &Self::Error> { Ok(&self.0) } - #[inline(always)] + #[inline] fn return_value(&self) -> &Self::ReturnValue { &() } @@ -236,12 +236,12 @@ impl ConstructorReturnType for private::Seal> { type Error = E; type ReturnValue = Result; - #[inline(always)] + #[inline] fn as_result(&self) -> Result<&C, &Self::Error> { self.0.as_ref() } - #[inline(always)] + #[inline] fn return_value(&self) -> &Self::ReturnValue { &self.0 } @@ -310,7 +310,7 @@ pub struct ExecuteMessageConfig { /// This work around that splits executing an ink! message into initiate /// and finalize phases was needed due to the fact that `is_result_type` /// and `is_result_err` macros do not work in generic contexts. -#[inline(always)] +#[inline] pub fn initiate_message( config: ExecuteMessageConfig, ) -> Result diff --git a/crates/lang/src/result_info.rs b/crates/lang/src/result_info.rs index 0679e9d1f2f..d7799b77c12 100644 --- a/crates/lang/src/result_info.rs +++ b/crates/lang/src/result_info.rs @@ -44,7 +44,7 @@ macro_rules! is_result_type { pub struct IsResultErr<'lt, T>(pub &'lt T); impl IsResultErr<'_, ::core::result::Result> { - #[inline(always)] + #[inline] // We need to allow for dead code at this point because // the Rust compiler thinks this function is unused even // though it acts as the specialized case for detection. @@ -55,7 +55,7 @@ impl IsResultErr<'_, ::core::result::Result> { } pub trait IsResultErrFallback { - #[inline(always)] + #[inline] fn value(&self) -> bool { false } diff --git a/crates/primitives/src/key.rs b/crates/primitives/src/key.rs index 954055da756..fafb20e4e3a 100644 --- a/crates/primitives/src/key.rs +++ b/crates/primitives/src/key.rs @@ -144,7 +144,7 @@ impl Key { } impl scale::Encode for Key { - #[inline(always)] + #[inline] fn size_hint(&self) -> usize { 32 } @@ -165,7 +165,7 @@ impl scale::Encode for Key { f(self.as_ref()) } - #[inline(always)] + #[inline] fn encoded_size(&self) -> usize { self.size_hint() } @@ -183,7 +183,7 @@ impl scale::Decode for Key { Ok(Self::from(bytes)) } - #[inline(always)] + #[inline] fn encoded_fixed_size() -> Option { Some(32) } diff --git a/crates/storage/src/collections/stash/storage.rs b/crates/storage/src/collections/stash/storage.rs index 551de1bbc56..a4f7fcb0a83 100644 --- a/crates/storage/src/collections/stash/storage.rs +++ b/crates/storage/src/collections/stash/storage.rs @@ -98,16 +98,16 @@ impl SpreadAllocate for Header { } impl PackedLayout for Header { - #[inline(always)] + #[inline] fn pull_packed(&mut self, _at: &Key) {} - #[inline(always)] + #[inline] fn push_packed(&self, _at: &Key) {} - #[inline(always)] + #[inline] fn clear_packed(&self, _at: &Key) {} } impl PackedAllocate for Header { - #[inline(always)] + #[inline] fn allocate_packed(&mut self, _at: &Key) {} } diff --git a/crates/storage/src/memory.rs b/crates/storage/src/memory.rs index 4d2945282d7..9f9a6e09309 100644 --- a/crates/storage/src/memory.rs +++ b/crates/storage/src/memory.rs @@ -80,10 +80,10 @@ where Default::default() } - #[inline(always)] + #[inline] fn push_spread(&self, _ptr: &mut KeyPtr) {} - #[inline(always)] + #[inline] fn clear_spread(&self, _ptr: &mut KeyPtr) {} } diff --git a/crates/storage/src/traits/impls/collections.rs b/crates/storage/src/traits/impls/collections.rs index 59c09c21d20..c093fae5b2c 100644 --- a/crates/storage/src/traits/impls/collections.rs +++ b/crates/storage/src/traits/impls/collections.rs @@ -163,7 +163,7 @@ where } } - #[inline(always)] + #[inline] fn pull_packed(&mut self, _at: &Key) { // We cannot mutate keys in a set so we cannot forward pull signals. } @@ -173,7 +173,7 @@ impl PackedAllocate for StdBTreeSet where T: PackedAllocate + Ord, { - #[inline(always)] + #[inline] fn allocate_packed(&mut self, _at: &Key) { // We cannot mutate keys in a set so we cannot forward pull signals. } @@ -228,7 +228,7 @@ where } } - #[inline(always)] + #[inline] fn pull_packed(&mut self, _at: &Key) { // We cannot mutate keys in a heap so we cannot forward pull signals. } @@ -238,7 +238,7 @@ impl PackedAllocate for StdBinaryHeap where T: PackedAllocate + Ord, { - #[inline(always)] + #[inline] fn allocate_packed(&mut self, _at: &Key) { // We cannot mutate keys in a heap so we cannot forward pull signals. } diff --git a/crates/storage/src/traits/impls/prims.rs b/crates/storage/src/traits/impls/prims.rs index 7bc602b8bf0..74c400edf4d 100644 --- a/crates/storage/src/traits/impls/prims.rs +++ b/crates/storage/src/traits/impls/prims.rs @@ -35,15 +35,15 @@ macro_rules! impl_layout_for_primitive { $( impl_always_packed_layout!($ty, deep: false); impl $crate::traits::PackedLayout for $ty { - #[inline(always)] + #[inline] fn pull_packed(&mut self, _at: &::ink_primitives::Key) {} - #[inline(always)] + #[inline] fn push_packed(&self, _at: &::ink_primitives::Key) {} - #[inline(always)] + #[inline] fn clear_packed(&self, _at: &::ink_primitives::Key) {} } impl $crate::traits::PackedAllocate for $ty { - #[inline(always)] + #[inline] fn allocate_packed(&mut self, _at: &::ink_primitives::Key) {} } )*