diff --git a/riscv/src/lib.rs b/riscv/src/lib.rs index 9454c48c..60c679cd 100644 --- a/riscv/src/lib.rs +++ b/riscv/src/lib.rs @@ -35,6 +35,8 @@ #![no_std] #![allow(clippy::missing_safety_doc)] +pub use paste::paste; + pub mod asm; pub mod bits; pub mod delay; diff --git a/riscv/src/register/macros.rs b/riscv/src/register/macros.rs index c1151ea9..1aeb082d 100644 --- a/riscv/src/register/macros.rs +++ b/riscv/src/register/macros.rs @@ -756,7 +756,7 @@ macro_rules! read_write_csr_field { $(#[$field_doc:meta])+ $field:ident: $bit:literal$(,)? ) => { - paste::paste! { + $crate::paste! { $crate::read_only_csr_field!( $ty, $(#[$field_doc])+ @@ -775,7 +775,7 @@ macro_rules! read_write_csr_field { $(#[$field_doc:meta])+ $field:ident: $bit_start:literal ..= $bit_end:literal$(,)? ) => { - paste::paste! { + $crate::paste! { $crate::read_only_csr_field!( $ty, $(#[$field_doc])+ @@ -794,7 +794,7 @@ macro_rules! read_write_csr_field { $(#[$field_doc:meta])+ $field:ident: [$bit_start:literal : $bit_end:literal]$(,)? ) => { - paste::paste! { + $crate::paste! { $crate::read_only_csr_field!( $ty, $(#[$field_doc])+ @@ -814,7 +814,7 @@ macro_rules! read_write_csr_field { $field:ident, $field_ty:ident: [$field_start:literal : $field_end:literal], ) => { - paste::paste! { + $crate::paste! { $crate::read_only_csr_field!( $ty, $(#[$field_doc])+ @@ -855,7 +855,7 @@ macro_rules! read_only_csr_field { const _: () = assert!($bit_end < usize::BITS); const _: () = assert!($bit_start < $bit_end); - paste::paste! { + $crate::paste! { impl $ty { $(#[$field_doc])+ #[inline] @@ -903,7 +903,7 @@ macro_rules! read_only_csr_field { const _: () = assert!($field_end < usize::BITS); const _: () = assert!($field_start <= $field_end); - paste::paste! { + $crate::paste! { impl $ty { $(#[$field_doc])+ #[inline] @@ -952,7 +952,7 @@ macro_rules! write_only_csr_field { const _: () = assert!($bit_end < usize::BITS); const _: () = assert!($bit_start < $bit_end); - paste::paste! { + $crate::paste! { impl $ty { $(#[$field_doc])+ #[doc = ""]