Skip to content

Commit 585d48c

Browse files
Merge pull request google#404 from google:fmt_note
PiperOrigin-RevId: 644346594
2 parents 50598fa + e8808a4 commit 585d48c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

googletest/src/matchers/matches_pattern.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,16 @@
272272
///
273273
/// Trailing commas are allowed (but not required) in both ordinary and tuple
274274
/// structs.
275+
///
276+
/// Note that the default format (rustfmt) can format macros if the macro
277+
/// argument is parseable Rust code. This is mostly true for this macro with two
278+
/// exceptions:
279+
/// * property matching
280+
/// * `ref` keyword with named fields
281+
///
282+
/// An option for formatting large is to avoid these exceptions (by removing the
283+
/// parenthesis of properties and the `ref` keywords), run `rustfmt` and add
284+
/// them back.
275285
#[macro_export]
276286
#[doc(hidden)]
277287
macro_rules! __matches_pattern {

0 commit comments

Comments
 (0)