summaryrefslogtreecommitdiff
path: root/userdiff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-10-27 15:09:46 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-10-27 15:09:46 -0700
commitdc53e7bc20347778cafb80d41bc37ce1a8902d55 (patch)
treef12e0dc0ede2d7b984a65940a597b0b227331450 /userdiff.c
parentMerge branch 'js/userdiff-php' (diff)
parentuserdiff: recognize 'macro_rules!' as starting a Rust function block (diff)
downloadtgif-dc53e7bc20347778cafb80d41bc37ce1a8902d55.tar.xz
Merge branch 'kb/userdiff-rust-macro-rules'
Userdiff for Rust update. * kb/userdiff-rust-macro-rules: userdiff: recognize 'macro_rules!' as starting a Rust function block
Diffstat (limited to 'userdiff.c')
-rw-r--r--userdiff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/userdiff.c b/userdiff.c
index 4e2b55a5e0..df85f0b8c5 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -165,7 +165,7 @@ PATTERNS("ruby", "^[ \t]*((class|module|def)[ \t].*)$",
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?."
"|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~"),
PATTERNS("rust",
- "^[\t ]*((pub(\\([^\\)]+\\))?[\t ]+)?((async|const|unsafe|extern([\t ]+\"[^\"]+\"))[\t ]+)?(struct|enum|union|mod|trait|fn|impl)[< \t]+[^;]*)$",
+ "^[\t ]*((pub(\\([^\\)]+\\))?[\t ]+)?((async|const|unsafe|extern([\t ]+\"[^\"]+\"))[\t ]+)?(struct|enum|union|mod|trait|fn|impl|macro_rules!)[< \t]+[^;]*)$",
/* -- */
"[a-zA-Z_][a-zA-Z0-9_]*"
"|[0-9][0-9_a-fA-Fiosuxz]*(\\.([0-9]*[eE][+-]?)?[0-9_fF]*)?"