about summary refs log tree commit diff
path: root/src/etc/vim
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-11-27 15:32:18 -0800
committerbors <bors@rust-lang.org>2013-11-27 15:32:18 -0800
commitd2c405eeff3930bf0c0777f06108a2eedcd456f6 (patch)
tree0672956c3f38a15d76316f27171bd663520a8659 /src/etc/vim
parentd662820b297f0ecda17126577571fcf886bdac81 (diff)
parentb50b1628840daf849e548c83372f85bc13092314 (diff)
downloadrust-d2c405eeff3930bf0c0777f06108a2eedcd456f6.tar.gz
rust-d2c405eeff3930bf0c0777f06108a2eedcd456f6.zip
auto merge of #10642 : cmr/rust/strict_doccomment, r=alexcrichton
Previously, `//// foo` and `/*** foo ***/` were accepted as doc comments. This
changes that, so that only `/// foo` and `/** foo ***/` are accepted. This
confuses many newcomers and it seems weird.

Also update the manual for these changes, and modernify the EBNF for comments.

Closes #10638
Diffstat (limited to 'src/etc/vim')
-rw-r--r--src/etc/vim/syntax/rust.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim
index e5ff089e2e1..dc1e58c1ae3 100644
--- a/src/etc/vim/syntax/rust.vim
+++ b/src/etc/vim/syntax/rust.vim
@@ -187,8 +187,8 @@ syn match   rustCharacter   /'\([^'\\]\|\\\([nrt0\\'"]\|x\x\{2}\|u\x\{4}\|U\x\{8
 
 syn region    rustCommentML   start="/\*" end="\*/" contains=rustTodo
 syn region    rustComment     start="//" end="$" contains=rustTodo keepend
-syn region    rustCommentMLDoc start="/\*\%(!\|\*/\@!\)" end="\*/" contains=rustTodo
-syn region    rustCommentDoc  start="//[/!]" end="$" contains=rustTodo keepend
+syn region    rustCommentMLDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo
+syn region    rustCommentDoc  start="//\%(//\@!\|!\)" end="$" contains=rustTodo keepend
 
 syn keyword rustTodo contained TODO FIXME XXX NB NOTE