@@ -21,6 +21,7 @@ pub enum FnDecorationKind {
2121 Requires ,
2222 Ensures { ret_binder : Pat } ,
2323 Decreases ,
24+ SMTPat ,
2425}
2526
2627impl ToString for FnDecorationKind {
@@ -29,6 +30,7 @@ impl ToString for FnDecorationKind {
2930 FnDecorationKind :: Requires => "requires" . to_string ( ) ,
3031 FnDecorationKind :: Ensures { .. } => "ensures" . to_string ( ) ,
3132 FnDecorationKind :: Decreases { .. } => "decreases" . to_string ( ) ,
33+ FnDecorationKind :: SMTPat { .. } => "SMTPat" . to_string ( ) ,
3234 }
3335 }
3436}
@@ -39,6 +41,7 @@ impl From<FnDecorationKind> for AssociationRole {
3941 FnDecorationKind :: Requires => AssociationRole :: Requires ,
4042 FnDecorationKind :: Ensures { .. } => AssociationRole :: Ensures ,
4143 FnDecorationKind :: Decreases => AssociationRole :: Decreases ,
44+ FnDecorationKind :: SMTPat => AssociationRole :: SMTPat ,
4245 }
4346 }
4447}
@@ -294,16 +297,17 @@ pub fn make_fn_decoration(
294297 if let Some ( generics) = generics {
295298 sig. generics = merge_generics ( generics, sig. generics ) ;
296299 }
297- sig. output = if let FnDecorationKind :: Decreases = & kind {
298- syn:: parse_quote! { -> ( ) }
299- } else {
300- syn:: parse_quote! { -> impl Into <:: hax_lib:: Prop > }
300+ sig. output = match & kind {
301+ FnDecorationKind :: Decreases | FnDecorationKind :: SMTPat => {
302+ syn:: parse_quote! { -> ( ) }
303+ }
304+ _ => syn:: parse_quote! { -> impl Into <:: hax_lib:: Prop > } ,
301305 } ;
302306 sig
303307 } ;
304308 let uid_attr = AttrPayload :: Uid ( uid. clone ( ) ) ;
305309 let late_skip = & AttrPayload :: ItemStatus ( ItemStatus :: Included { late_skip : true } ) ;
306- if let FnDecorationKind :: Decreases = & kind {
310+ if let FnDecorationKind :: Decreases | FnDecorationKind :: SMTPat = & kind {
307311 phi = parse_quote ! { :: hax_lib:: any_to_unit( #phi) } ;
308312 } ;
309313 let quantifiers = if let FnDecorationKind :: Decreases = & kind {
0 commit comments