File tree Expand file tree Collapse file tree 3 files changed +16
-11
lines changed
Expand file tree Collapse file tree 3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -161,14 +161,6 @@ enum BodyElement<'a> {
161161 ForeignItem ( & ' a ast:: ForeignItem ) ,
162162}
163163
164- impl BodyElement < ' _ > {
165- pub ( crate ) fn span ( & self ) -> Span {
166- match self {
167- BodyElement :: ForeignItem ( fi) => fi. span ( ) ,
168- }
169- }
170- }
171-
172164/// Represents a fn's signature.
173165pub ( crate ) struct FnSig < ' a > {
174166 decl : & ' a ast:: FnDecl ,
@@ -277,9 +269,6 @@ impl<'a> FmtVisitor<'a> {
277269 self . block_indent = self . block_indent . block_indent ( self . config ) ;
278270
279271 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 ( ) ;
283272 for item in & item. body {
284273 self . format_body_element ( item) ;
285274 }
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