diff --git a/crates/rune-alloc/src/boxed.rs b/crates/rune-alloc/src/boxed.rs index b25743a36..0258a1488 100644 --- a/crates/rune-alloc/src/boxed.rs +++ b/crates/rune-alloc/src/boxed.rs @@ -176,8 +176,8 @@ use crate::vec::Vec; #[test] fn ensure_niche_size() { assert_eq!( - ::core::mem::size_of::>>(), - ::core::mem::size_of::>() + core::mem::size_of::>>(), + core::mem::size_of::>() ); } diff --git a/crates/rune-alloc/src/clone.rs b/crates/rune-alloc/src/clone.rs index e22c1be7a..57030154d 100644 --- a/crates/rune-alloc/src/clone.rs +++ b/crates/rune-alloc/src/clone.rs @@ -118,23 +118,23 @@ impl_copy!(i128); impl_copy!(f32); impl_copy!(f64); -impl_copy!(::core::num::NonZeroUsize); -impl_copy!(::core::num::NonZeroIsize); -impl_copy!(::core::num::NonZeroU8); -impl_copy!(::core::num::NonZeroU16); -impl_copy!(::core::num::NonZeroU32); -impl_copy!(::core::num::NonZeroU64); -impl_copy!(::core::num::NonZeroU128); -impl_copy!(::core::num::NonZeroI8); -impl_copy!(::core::num::NonZeroI16); -impl_copy!(::core::num::NonZeroI32); -impl_copy!(::core::num::NonZeroI64); -impl_copy!(::core::num::NonZeroI128); +impl_copy!(core::num::NonZeroUsize); +impl_copy!(core::num::NonZeroIsize); +impl_copy!(core::num::NonZeroU8); +impl_copy!(core::num::NonZeroU16); +impl_copy!(core::num::NonZeroU32); +impl_copy!(core::num::NonZeroU64); +impl_copy!(core::num::NonZeroU128); +impl_copy!(core::num::NonZeroI8); +impl_copy!(core::num::NonZeroI16); +impl_copy!(core::num::NonZeroI32); +impl_copy!(core::num::NonZeroI64); +impl_copy!(core::num::NonZeroI128); #[cfg(feature = "std")] impl_copy!(::std::process::ExitStatus); -impl TryClone for ::core::result::Result +impl TryClone for core::result::Result where T: TryClone, E: TryClone, @@ -148,7 +148,7 @@ where } } -impl TryClone for ::core::option::Option +impl TryClone for core::option::Option where T: TryClone, { diff --git a/crates/rune-core/src/protocol.rs b/crates/rune-core/src/protocol.rs index c9edffe1b..d785c66be 100644 --- a/crates/rune-core/src/protocol.rs +++ b/crates/rune-core/src/protocol.rs @@ -510,8 +510,8 @@ define! { /// Note that it uses the `Result` like [`Try`] uses [`ControlFlow`] i.e., /// for `Result::` it should return `Result>` /// - /// [`Try`]: ::core::ops::Try - /// [`ControlFlow`]: ::core::ops::ControlFlow + /// [`Try`]: core::ops::Try + /// [`ControlFlow`]: core::ops::ControlFlow pub const [TRY, TRY_HASH]: Protocol = Protocol { name: "try", hash: 0x5da1a80787003354u64, diff --git a/crates/rune/src/compile/error.rs b/crates/rune/src/compile/error.rs index 3e8f3293b..64a46becd 100644 --- a/crates/rune/src/compile/error.rs +++ b/crates/rune/src/compile/error.rs @@ -87,8 +87,8 @@ impl core::error::Error for Error { } impl fmt::Display for Error { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - ::core::fmt::Display::fmt(&self.kind, f) + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::Display::fmt(&self.kind, f) } } diff --git a/crates/rune/src/compile/mod.rs b/crates/rune/src/compile/mod.rs index 950ff8e1d..c50728a32 100644 --- a/crates/rune/src/compile/mod.rs +++ b/crates/rune/src/compile/mod.rs @@ -78,4 +78,4 @@ mod compile; pub(crate) use self::compile::compile; /// Helper alias for compile results. -pub type Result = ::core::result::Result; +pub type Result = core::result::Result; diff --git a/crates/rune/src/runtime/macros.rs b/crates/rune/src/runtime/macros.rs index 7f9a28fca..2c40dc71b 100644 --- a/crates/rune/src/runtime/macros.rs +++ b/crates/rune/src/runtime/macros.rs @@ -9,7 +9,7 @@ macro_rules! range_iter { $ty: $crate::runtime::FromValue + $crate::runtime::ToValue, $ty: $crate::runtime::MaybeTypeOf + $crate::runtime::TypeOf, { - iter: ::core::ops::$range<$ty>, + iter: core::ops::$range<$ty>, } impl<$ty> $name<$ty> @@ -18,10 +18,10 @@ macro_rules! range_iter { $ty: $crate::compile::Named, $ty: $crate::runtime::FromValue + $crate::runtime::ToValue, $ty: $crate::runtime::MaybeTypeOf + $crate::runtime::TypeOf, - ::core::ops::$range<$ty>: Iterator, + core::ops::$range<$ty>: Iterator, { #[inline] - pub(crate) fn new(iter: ::core::ops::$range<$ty>) -> Self { + pub(crate) fn new(iter: core::ops::$range<$ty>) -> Self { Self { iter } } @@ -40,7 +40,7 @@ macro_rules! range_iter { $ty: $crate::compile::Named, $ty: $crate::runtime::FromValue + $crate::runtime::ToValue, $ty: $crate::runtime::MaybeTypeOf + $crate::runtime::TypeOf, - ::core::ops::$range<$ty>: Iterator, + core::ops::$range<$ty>: Iterator, { type Item = $ty; @@ -62,7 +62,7 @@ macro_rules! double_ended_range_iter { T: $crate::compile::Named, T: $crate::runtime::FromValue + $crate::runtime::ToValue, T: $crate::runtime::MaybeTypeOf + $crate::runtime::TypeOf, - ::core::ops::$range: DoubleEndedIterator, + core::ops::$range: DoubleEndedIterator, { #[rune::function(instance, keep, protocol = NEXT_BACK)] #[inline] @@ -77,7 +77,7 @@ macro_rules! double_ended_range_iter { T: $crate::compile::Named, T: $crate::runtime::FromValue + $crate::runtime::ToValue, T: $crate::runtime::MaybeTypeOf + $crate::runtime::TypeOf, - ::core::ops::$range: DoubleEndedIterator, + core::ops::$range: DoubleEndedIterator, { #[inline] fn next_back(&mut self) -> Option { diff --git a/crates/rune/src/support.rs b/crates/rune/src/support.rs index b04389fcf..dae8436da 100644 --- a/crates/rune/src/support.rs +++ b/crates/rune/src/support.rs @@ -26,7 +26,7 @@ pub(crate) mod no_std { /// /// For errors which aren't automatically captures, you should map them /// using [`Error::msg`]. - pub type Result = ::core::result::Result; + pub type Result = core::result::Result; /// Error kind which supports capturing any toplevel errors produced by /// Rune.