ForeignItem(&'a ast::ForeignItem),
}
-impl BodyElement<'_> {
- pub(crate) fn span(&self) -> Span {
- match self {
- BodyElement::ForeignItem(fi) => fi.span(),
- }
- }
-}
-
/// Represents a fn's signature.
pub(crate) struct FnSig<'a> {
decl: &'a ast::FnDecl,
self.block_indent = self.block_indent.block_indent(self.config);
if !item.body.is_empty() {
- // Advance to first item (statement or inner attribute)
- // within the block.
- self.last_pos = item.body[0].span().lo();
for item in &item.body {
self.format_body_element(item);
}
--- /dev/null
+#![allow(clippy::no_effect)]
+
+extern "C" {
+ // N.B., mutability can be easily incorrect in FFI calls -- as
+ // in C, the default is mutable pointers.
+ fn ffi(c: *mut u8);
+ fn int_ffi(c: *mut i32);
+}
\ No newline at end of file
--- /dev/null
+#![allow(clippy::no_effect)]
+
+extern "C" {
+ // N.B., mutability can be easily incorrect in FFI calls -- as
+ // in C, the default is mutable pointers.
+ fn ffi(c: *mut u8);
+ fn int_ffi(c: *mut i32);
+}