CS-Notes/docs/_style/prism-master/tests/languages/rust/closure-params_feature.test

30 lines
580 B
Plaintext
Raw Normal View History

2018-12-19 14:09:39 +08:00
|x: int, y: int| -> int {}
|| {}
----------------------------------------------------
[
["closure-params", [
["punctuation", "|"],
"x",
["punctuation", ":"],
" int",
["punctuation", ","],
" y",
["punctuation", ":"],
" int",
["punctuation", "|"]
]],
["punctuation", "->"],
" int ", ["punctuation", "{"], ["punctuation", "}"],
["closure-params", [
["punctuation", "|"],
["punctuation", "|"]
]],
["punctuation", "{"], ["punctuation", "}"]
]
----------------------------------------------------
Checks for closure params.