Re: [PATCH v4 02/14] rust: hrtimer: introduce hrtimer support
From: Guangbo Cui
Date: Sat Dec 07 2024 - 09:41:20 EST
> +#[macro_export]
> +macro_rules! impl_has_timer {
> + (
> + impl$({$($generics:tt)*})?
> + HasTimer<$timer_type:ty>
> + for $self:ty
> + { self.$field:ident }
> + $($rest:tt)*
> + ) => {
> + // SAFETY: This implementation of `raw_get_timer` only compiles if the
> + // field has the right type.
> + unsafe impl$(<$($generics)*>)? $crate::time::hrtimer::HasTimer<$timer_type> for $self {
> + const OFFSET: usize = ::core::mem::offset_of!(Self, $field) as usize;
> +
> + #[inline]
> + unsafe fn raw_get_timer(ptr: *const Self) ->
> + *const $crate::::time::hrtimer::Timer<$timer_type>
Hi Andreas, an extra `::` here.
Best regards,
Guangbo Cui