Skip to content

Commit b65201a

Browse files
Add rustfmt::skip for macros
1 parent aad8676 commit b65201a

File tree

27 files changed

+77
-1
lines changed

27 files changed

+77
-1
lines changed

ffi_tests/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ fn my_renamed_ptr_api() -> MyRenamedPtr {
203203
}
204204
}
205205

206+
#[cfg_attr(rustfmt, rustfmt::skip)]
206207
macro_rules! docs {() => (
207208
"Hello, `World`!"
208209
)}

napi-dispatcher/dispatcher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![warn(warnings)] // Prevent `-Dwarnings` from causing breakage.
22
#![allow(clippy::all)]
33

4+
#[cfg_attr(rustfmt, rustfmt::skip)]
45
macro_rules! emit {( $($_:tt)* ) => ( $($_)* )}
56

67
#[cfg(target_arch = "wasm32")] emit! {

napi-dispatcher/wasm/src/utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[cfg_attr(rustfmt, rustfmt::skip)]
12
macro_rules! new_type_wrappers {(
23
$(
34
$( #[$js_unknown:ident] )?

src/_lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ mod prelude {
427427
}
428428

429429
#[macro_export]
430+
#[cfg_attr(rustfmt, rustfmt::skip)]
430431
macro_rules! NULL {() => (
431432
$crate::::ptr::null_mut()
432433
)}
@@ -449,6 +450,7 @@ struct __PanicOnDrop__ {} impl Drop for __PanicOnDrop__ {
449450
}
450451
}
451452

453+
#[cfg_attr(rustfmt, rustfmt::skip)]
452454
#[apply(hidden_export)]
453455
macro_rules! __abort_with_msg__ { ($($tt:tt)*) => (
454456
match ($crate::__PanicOnDrop__ {}) { _ => {
@@ -505,6 +507,7 @@ mod __ {
505507
match_cfg! {
506508
feature = "stabby" => {
507509
#[doc(hidden)] /** Not part of the public API. */ #[macro_export]
510+
#[cfg_attr(rustfmt, rustfmt::skip)]
508511
macro_rules! ඞmaybe_stabby {(
509512
$($item:tt)*
510513
) => (
@@ -515,6 +518,7 @@ mod __ {
515518
},
516519
_ => {
517520
#[doc(hidden)] /** Not part of the public API. */ #[macro_export]
521+
#[cfg_attr(rustfmt, rustfmt::skip)]
518522
macro_rules! ඞmaybe_stabby {(
519523
$($item:tt)*
520524
) => (
@@ -589,18 +593,21 @@ mod __ {
589593

590594
match_cfg! {
591595
feature = "log" => {
596+
#[cfg_attr(rustfmt, rustfmt::skip)]
592597
#[apply(hidden_export)]
593598
macro_rules! __error__ {( $($msg:tt)* ) => (
594599
$crate::log::error! { $($msg)* }
595600
)}
596601
},
597602
feature = "std" => {
603+
#[cfg_attr(rustfmt, rustfmt::skip)]
598604
#[apply(hidden_export)]
599605
macro_rules! __error__ {( $($msg:tt)* ) => (
600606
$crate::::eprintln! { $($msg)* }
601607
)}
602608
},
603609
_ => {
610+
#[cfg_attr(rustfmt, rustfmt::skip)]
604611
#[apply(hidden_export)]
605612
macro_rules! __error__ {( $($msg:tt)* ) => (
606613
/* nothing we can do */
@@ -698,6 +705,7 @@ mod __ {
698705

699706
#[doc(hidden)] /** Not part of the public API! */
700707
#[macro_export]
708+
#[cfg_attr(rustfmt, rustfmt::skip)]
701709
macro_rules! ඞassert_expr {( $e:expr $(,)? ) => ( $e )}
702710
#[doc(inline)]
703711
pub use ඞassert_expr as assert_expr;

src/char_p.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ cfg_alloc! {
423423
pub
424424
trait __<Orig> { fn my_from (it: Orig) -> Self; }
425425
}
426+
#[cfg_attr(rustfmt, rustfmt::skip)]
426427
macro_rules! derive_MyFrom_from {(
427428
$(
428429
$(@for[$($generics:tt)*])?

src/closure/arc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use ::alloc::sync::Arc;
55

66
use_prelude!();
77

8+
#[cfg_attr(rustfmt, rustfmt::skip)]
89
macro_rules! with_tuple {(
910
$ArcDynFn_N:ident => (
1011
$( $A_N:ident, $($A_k:ident ,)* )?
@@ -247,6 +248,7 @@ macro_rules! with_tuple {(
247248
}
248249
)}
249250

251+
#[cfg_attr(rustfmt, rustfmt::skip)]
250252
macro_rules! with_tuples {
251253
(
252254
$ArcDynFn0:ident,

src/closure/borrowed.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
use_prelude!();
55

6+
#[cfg_attr(rustfmt, rustfmt::skip)]
67
macro_rules! with_tuple {(
78
$RefDynFnMut_N:ident => (
89
$( $A_N:ident, $($A_k:ident ,)* )?
@@ -145,6 +146,7 @@ macro_rules! with_tuple {(
145146
}
146147
)}
147148

149+
#[cfg_attr(rustfmt, rustfmt::skip)]
148150
macro_rules! with_tuples {
149151
(
150152
$RefDynFnMut0:ident,

src/closure/boxed.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use_prelude!();
55
use ::alloc::boxed::Box;
66

7+
#[cfg_attr(rustfmt, rustfmt::skip)]
78
macro_rules! with_tuple {(
89
$BoxDynFnMut_N:ident => (
910
$( $A_N:ident, $($A_k:ident ,)* )?
@@ -188,6 +189,7 @@ macro_rules! with_tuple {(
188189
}
189190
)}
190191

192+
#[cfg_attr(rustfmt, rustfmt::skip)]
191193
macro_rules! with_tuples {
192194
(
193195
$BoxDynFnMut0:ident,

src/dyn_traits/futures/executor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ match_cfg!(feature = "tokio" => {
200200
});
201201

202202
#[macro_export]
203+
#[cfg_attr(rustfmt, rustfmt::skip)]
203204
macro_rules! ffi_export_future_helpers {() => (
204205
const _: () = {
205206
use $crate::::std::{sync::Arc, task::Context, prelude::v1::*};

src/headers/languages/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ concat!(
301301
/// where `"{indent}"` is the first parameter passed to `mk_out!`,
302302
/// and the second parameter is the `impl Write` the `write!`s will
303303
/// be outputting to.
304+
#[cfg_attr(rustfmt, rustfmt::skip)]
304305
macro_rules! mk_out {
305306
(
306307
$indent_name:ident,
@@ -313,6 +314,7 @@ macro_rules! mk_out {
313314
(
314315
$indent_name:tt /* $indent:tt */ $out:tt $_:tt
315316
) => (
317+
#[cfg_attr(rustfmt, rustfmt::skip)]
316318
macro_rules! out {
317319
(
318320
($_(

0 commit comments

Comments
 (0)