From fcd911f122b3546c794646847cbec8a557f4be5d Mon Sep 17 00:00:00 2001 From: Sunjay Varma Date: Mon, 11 May 2020 09:32:41 -0400 Subject: [PATCH] Add snippets for eprint, eprintln, todo, unimplemented, and unreachable --- snippets/rust.cson | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/snippets/rust.cson b/snippets/rust.cson index bf61778..528ce20 100644 --- a/snippets/rust.cson +++ b/snippets/rust.cson @@ -21,6 +21,12 @@ \t$2 } ''' + 'eprint': + 'prefix': 'eprint' + 'body': 'eprint!("${1:{${2::?}\\}}", ${3});' + 'eprintln': + 'prefix': 'eprintln' + 'body': 'eprintln!("${1:{${2::?}\\}}", ${3});' 'fn': 'prefix': 'fn' 'body': ''' @@ -124,6 +130,9 @@ \t} } ''' + 'todo': + 'prefix': 'todo' + 'body': 'todo!($1)$2' 'trait': 'prefix': 'trait' 'body': ''' @@ -134,6 +143,12 @@ 'type': 'prefix': 'type' 'body': 'type ${1:TypeName} = ${2:TypeName};' + 'unimplemented': + 'prefix': 'unimplemented' + 'body': 'unimplemented!($1)$2' + 'unreachable': + 'prefix': 'unreachable' + 'body': 'unreachable!($1)$2' 'warn': 'prefix': 'warn' 'body': '#[warn(${1:lint})]'