File tree 3 files changed +16
-11
lines changed
3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -161,14 +161,6 @@ enum BodyElement<'a> {
161
161
ForeignItem ( & ' a ast:: ForeignItem ) ,
162
162
}
163
163
164
- impl BodyElement < ' _ > {
165
- pub ( crate ) fn span ( & self ) -> Span {
166
- match self {
167
- BodyElement :: ForeignItem ( fi) => fi. span ( ) ,
168
- }
169
- }
170
- }
171
-
172
164
/// Represents a fn's signature.
173
165
pub ( crate ) struct FnSig < ' a > {
174
166
decl : & ' a ast:: FnDecl ,
@@ -277,9 +269,6 @@ impl<'a> FmtVisitor<'a> {
277
269
self . block_indent = self . block_indent . block_indent ( self . config ) ;
278
270
279
271
if !item. body . is_empty ( ) {
280
- // Advance to first item (statement or inner attribute)
281
- // within the block.
282
- self . last_pos = item. body [ 0 ] . span ( ) . lo ( ) ;
283
272
for item in & item. body {
284
273
self . format_body_element ( item) ;
285
274
}
Original file line number Diff line number Diff line change
1
+ #![ allow( clippy:: no_effect) ]
2
+
3
+ extern "C" {
4
+ // N.B., mutability can be easily incorrect in FFI calls -- as
5
+ // in C, the default is mutable pointers.
6
+ fn ffi ( c : * mut u8 ) ;
7
+ fn int_ffi ( c : * mut i32 ) ;
8
+ }
Original file line number Diff line number Diff line change
1
+ #![ allow( clippy:: no_effect) ]
2
+
3
+ extern "C" {
4
+ // N.B., mutability can be easily incorrect in FFI calls -- as
5
+ // in C, the default is mutable pointers.
6
+ fn ffi ( c : * mut u8 ) ;
7
+ fn int_ffi ( c : * mut i32 ) ;
8
+ }
You can’t perform that action at this time.
0 commit comments