1
0
Fork 0
mirror of synced 2024-11-22 16:55:34 -05:00
ultimate-vim/sources_non_forked/vim-snippets/UltiSnips/rust.snippets
2017-05-02 14:42:08 +02:00

34 lines
667 B
Text

#######################################################################
# Rust Snippets #
#######################################################################
priority -50
snippet arg "Function Arguments" i
${1:a}: ${2:T}${3:, arg}
endsnippet
snippet || "Closure, anonymous function (inline)" i
${1:move }|$2| { $3 }
endsnippet
snippet |} "Closure, anonymous function (block)" i
${1:move }|$2| {
$3
}
endsnippet
snippet macro "macro_rules!" b
macro_rules! ${1:name} {
(${2:matcher}) => (
$3
)
}
endsnippet
snippet fd "Struct field definition" w
${1:name}: ${2:Type},
endsnippet
# vim:ft=snippets: