@@ -348,12 +348,12 @@ impl<'tcx> KaniAttributes<'tcx> {
348
348
"Use of unstable feature `{}`: {}" ,
349
349
unstable_attr. feature, unstable_attr. reason
350
350
) )
351
- . span_note (
351
+ . with_span_note (
352
352
self . tcx . def_span ( self . item ) ,
353
353
format ! ( "the function `{fn_name}` is unstable:" ) ,
354
354
)
355
- . note ( format ! ( "see issue {} for more information" , unstable_attr. issue) )
356
- . help ( format ! ( "use `-Z {}` to enable using this function." , unstable_attr. feature) )
355
+ . with_note ( format ! ( "see issue {} for more information" , unstable_attr. issue) )
356
+ . with_help ( format ! ( "use `-Z {}` to enable using this function." , unstable_attr. feature) )
357
357
. emit ( )
358
358
}
359
359
@@ -422,7 +422,7 @@ impl<'tcx> KaniAttributes<'tcx> {
422
422
self . item_name( ) ,
423
423
) ,
424
424
)
425
- . span_note ( self . tcx . def_span ( id) , "Try adding a contract to this function." )
425
+ . with_span_note ( self . tcx . def_span ( id) , "Try adding a contract to this function." )
426
426
. emit ( ) ;
427
427
return ;
428
428
} ;
@@ -448,7 +448,7 @@ impl<'tcx> KaniAttributes<'tcx> {
448
448
self . item_name( ) ,
449
449
) ,
450
450
)
451
- . span_note (
451
+ . with_span_note (
452
452
self . tcx . def_span ( def_id) ,
453
453
format ! (
454
454
"Try adding a contract to this function or use the unsound `{}` attribute instead." ,
@@ -624,7 +624,7 @@ impl<'a> UnstableAttrParseError<'a> {
624
624
self . attr . span ,
625
625
format ! ( "failed to parse `#[kani::unstable]`: {}" , self . reason) ,
626
626
)
627
- . note ( format ! (
627
+ . with_note ( format ! (
628
628
"expected format: #[kani::unstable({}, {}, {})]" ,
629
629
r#"feature="<IDENTIFIER>""# , r#"issue="<ISSUE>""# , r#"reason="<DESCRIPTION>""#
630
630
) )
@@ -665,7 +665,7 @@ fn expect_no_args(tcx: TyCtxt, kind: KaniAttributeKind, attr: &Attribute) {
665
665
if !attr. is_word ( ) {
666
666
tcx. dcx ( )
667
667
. struct_span_err ( attr. span , format ! ( "unexpected argument for `{}`" , kind. as_ref( ) ) )
668
- . help ( "remove the extra argument" )
668
+ . with_help ( "remove the extra argument" )
669
669
. emit ( ) ;
670
670
}
671
671
}
0 commit comments