File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -198,12 +198,40 @@ pub trait IndexRanges:
198
198
```
199
199
200
200
201
+ ### Impls
202
+
203
+ Impl items should be block indented. If there are no items, the impl may be
204
+ formatted on a single line. Otherwise there should be line-breaks after the
205
+ opening brace and before the closing brace:
206
+
207
+ ``` rust
208
+ impl Foo {}
209
+
210
+ impl Bar for Foo {
211
+ ...
212
+ }
213
+ ```
214
+
215
+ Avoid line-breaking in the signature if possible. If a line break is required in
216
+ a non-inherent impl, break immediately before ` for ` , block indent the concrete type
217
+ and put the opening brace on it's own line:
218
+
219
+ ``` rust
220
+ impl Bar
221
+ for Foo
222
+ {
223
+ ...
224
+ }
225
+ ```
226
+
227
+
201
228
### Extern crate
202
229
203
230
` extern crate foo; `
204
231
205
232
Use spaces around keywords, no spaces around the semi-colon.
206
233
234
+
207
235
### Modules
208
236
209
237
``` rust
You can’t perform that action at this time.
0 commit comments