Skip to content

Commit 31b1b63

Browse files
authored
Merge pull request #184 from Sh3Rm4n/doc-paste
Use paste! instead of doc_comment!
2 parents e05211f + cf7492a commit 31b1b63

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ nb = "0.1"
3333
paste = "1"
3434
rtcc = "0.2"
3535
stm32f3 = "0.12"
36-
doc-comment = "0.3.3"
3736

3837
[dependencies.embedded-hal-can]
3938
version = "0.1.0"

src/dma.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ macro_rules! dma {
420420
), )+
421421
},
422422
) => {
423-
doc_comment::doc_comment! {
424-
concat!("All associated types, traits and methods of the ", stringify!($DMAx), " peripheral."),
423+
paste::paste! {
424+
#[doc = "All associated types, traits and methods of the `" $DMAx "` peripheral."]
425425
pub mod $dmax {
426426
use super::*;
427427
use crate::pac::$DMAx;

src/gpio.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ macro_rules! gpio {
260260
impl <MODE> toggleable::Default for PXx<Output<MODE>> {}
261261

262262
$(
263-
doc_comment::doc_comment!{
264-
concat!("All Pins and associated functions for GPIO Bank: ", stringify!($GPIOX)),
263+
paste::paste!{
264+
#[doc = "All Pins and associated functions for GPIO Bank: `" $GPIOX "`"]
265265
pub mod $gpiox {
266266
use core::marker::PhantomData;
267267
use core::convert::Infallible;
@@ -465,8 +465,8 @@ macro_rules! gpio {
465465
impl<MODE> toggleable::Default for $PXx<Output<MODE>> {}
466466

467467
$(
468-
doc_comment::doc_comment! {
469-
concat!("Pin ", stringify!($PXi)),
468+
paste::paste! {
469+
#[doc = "Pin `" $PXi "`"]
470470
pub struct $PXi<MODE> {
471471
_mode: PhantomData<MODE>,
472472
}
@@ -475,8 +475,8 @@ macro_rules! gpio {
475475
impl<MODE> $PXi<MODE> {
476476
$(
477477
// /// Configures the pin to serve as a specific alternate function
478-
doc_comment::doc_comment!{
479-
concat!("Configures ", stringify!($PXi), " to serve as alternate function: ", stringify!($AFi)),
478+
paste::paste!{
479+
#[doc = "Configures `" $PXi "` to serve as alternate function: `" $AFi "`"]
480480
pub fn $into_afi(
481481
self,
482482
moder: &mut MODER,

0 commit comments

Comments
 (0)