Skip to content

Commit 29c04e7

Browse files
committed
Rustfmt again?
1 parent ae4443b commit 29c04e7

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

procedural-masquerade/lib.rs

+27-27
Original file line numberDiff line numberDiff line change
@@ -244,33 +244,33 @@ macro_rules! define_invoke_proc_macro {
244244
#[doc(hidden)]
245245
#[macro_export]
246246
macro_rules! $macro_name {
247-
($proc_macro_name: ident ! $paren: tt) => {
248-
#[derive($proc_macro_name)]
249-
#[allow(unused)]
250-
enum ProceduralMasqueradeDummyType {
251-
// The magic happens here.
252-
//
253-
// We use an `enum` with an explicit discriminant
254-
// because that is the only case where a type definition
255-
// can contain a (const) expression.
256-
//
257-
// `(0, "foo").0` evalutes to 0, with the `"foo"` part ignored.
258-
//
259-
// By the time the `#[proc_macro_derive]` function
260-
// implementing `#[derive($proc_macro_name)]` is called,
261-
// `$paren` has already been replaced with the input of this inner macro,
262-
// but `stringify!` has not been expanded yet.
263-
//
264-
// This how arbitrary tokens can be inserted
265-
// in the input to the `#[proc_macro_derive]` function.
266-
//
267-
// Later, `stringify!(...)` is expanded into a string literal
268-
// which is then ignored.
269-
// Using `stringify!` enables passing arbitrary tokens
270-
// rather than only what can be parsed as a const expression.
271-
Input = (0, stringify! $paren ).0
247+
($proc_macro_name: ident ! $paren: tt) => {
248+
#[derive($proc_macro_name)]
249+
#[allow(unused)]
250+
enum ProceduralMasqueradeDummyType {
251+
// The magic happens here.
252+
//
253+
// We use an `enum` with an explicit discriminant
254+
// because that is the only case where a type definition
255+
// can contain a (const) expression.
256+
//
257+
// `(0, "foo").0` evalutes to 0, with the `"foo"` part ignored.
258+
//
259+
// By the time the `#[proc_macro_derive]` function
260+
// implementing `#[derive($proc_macro_name)]` is called,
261+
// `$paren` has already been replaced with the input of this inner macro,
262+
// but `stringify!` has not been expanded yet.
263+
//
264+
// This how arbitrary tokens can be inserted
265+
// in the input to the `#[proc_macro_derive]` function.
266+
//
267+
// Later, `stringify!(...)` is expanded into a string literal
268+
// which is then ignored.
269+
// Using `stringify!` enables passing arbitrary tokens
270+
// rather than only what can be parsed as a const expression.
271+
Input = (0, stringify! $paren ).0
272+
}
273+
}
272274
}
273-
}
274-
}
275275
};
276276
}

0 commit comments

Comments
 (0)