Skip to content

Commit bd63b2c

Browse files
committed
Also add snippets for deny and warn attributes
1 parent 15e757e commit bd63b2c

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

snippets/rust.cson

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
'.source.rust':
2+
'allow':
3+
'prefix': 'allow'
4+
'body': '#[allow(${1:lint})]'
5+
'allow!':
6+
'prefix': 'allow!'
7+
'body': '#![allow(${1:lint})]'
8+
'deny':
9+
'prefix': 'deny'
10+
'body': '#[deny(${1:lint})]'
11+
'deny!':
12+
'prefix': 'deny!'
13+
'body': '#![deny(${1:lint})]'
14+
'derive':
15+
'prefix': 'derive'
16+
'body': '#[derive(${1:Trait})]'
217
'enum':
318
'prefix': 'enum'
419
'body': '''
@@ -119,19 +134,16 @@
119134
'type':
120135
'prefix': 'type'
121136
'body': 'type ${1:TypeName} = ${2:TypeName};'
137+
'warn':
138+
'prefix': 'warn'
139+
'body': '#[warn(${1:lint})]'
140+
'warn!':
141+
'prefix': 'warn!'
142+
'body': '#![warn(${1:lint})]'
122143
'while':
123144
'prefix': 'while'
124145
'body': '''
125146
while ${1:expression} {
126147
\t$2
127148
}
128149
'''
129-
'derive':
130-
'prefix': 'derive'
131-
'body': '#[derive(${1:trait})]'
132-
'allow':
133-
'prefix': 'allow'
134-
'body': '#[allow(${1:lint})]'
135-
'allow!':
136-
'prefix': 'allow!'
137-
'body': '#![allow(${1:lint})]'

0 commit comments

Comments
 (0)