From 5aa04f54f60c726c87c44bc9319de7f245905ed3 Mon Sep 17 00:00:00 2001 From: Adrian Palacios Date: Mon, 17 Jun 2024 21:08:45 +0000 Subject: [PATCH] Fix format --- library/kani_macros/src/derive.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/library/kani_macros/src/derive.rs b/library/kani_macros/src/derive.rs index 6ab5adc1a8bd..de173b53bbb6 100644 --- a/library/kani_macros/src/derive.rs +++ b/library/kani_macros/src/derive.rs @@ -426,15 +426,18 @@ fn struct_invariant_conjunction(ident: &Ident, fields: &Fields) -> TokenStream { /// Generates an `Invariant` implementation where the `is_safe` function body is /// the `attr` expression passed to the attribute macro. /// Only available for structs. -pub fn attr_custom_invariant(attr: TokenStream, item: proc_macro::TokenStream) -> proc_macro::TokenStream { +pub fn attr_custom_invariant( + attr: TokenStream, + item: proc_macro::TokenStream, +) -> proc_macro::TokenStream { let derive_item = parse_macro_input!(item as DeriveInput); let item_name = &derive_item.ident; if !matches!(derive_item.data, Data::Struct(..)) { abort!(Span::call_site(), "Cannot define invariant for `{}`", item_name; - note = item_name.span() => - "`#[kani::invariant(..)]` is only available for structs" - ) + note = item_name.span() => + "`#[kani::invariant(..)]` is only available for structs" + ) } // Keep a copy of the original item to re-emit it later.