File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -225,25 +225,33 @@ impl<'tcx, 'sess> TranslationCtx<'tcx> {
225
225
}
226
226
227
227
pub ( crate ) fn crash_and_error ( & self , span : Span , msg : & str ) -> ! {
228
- self . tcx . sess . span_fatal_with_code ( span, msg, DiagnosticId :: Error ( String :: from ( "creusot" ) ) )
228
+ self . tcx . sess . span_fatal_with_code (
229
+ span,
230
+ msg. to_string ( ) ,
231
+ DiagnosticId :: Error ( String :: from ( "creusot" ) ) ,
232
+ )
229
233
}
230
234
231
235
pub ( crate ) fn fatal_error ( & self , span : Span , msg : & str ) -> DiagnosticBuilder < ' tcx , !> {
232
236
self . tcx . sess . struct_span_fatal_with_code (
233
237
span,
234
- msg,
238
+ msg. to_string ( ) ,
235
239
DiagnosticId :: Error ( String :: from ( "creusot" ) ) ,
236
240
)
237
241
}
238
242
239
243
pub ( crate ) fn error ( & self , span : Span , msg : & str ) {
240
- self . tcx . sess . span_err_with_code ( span, msg, DiagnosticId :: Error ( String :: from ( "creusot" ) ) )
244
+ self . tcx . sess . span_err_with_code (
245
+ span,
246
+ msg. to_string ( ) ,
247
+ DiagnosticId :: Error ( String :: from ( "creusot" ) ) ,
248
+ )
241
249
}
242
250
243
251
pub ( crate ) fn warn ( & self , span : Span , msg : & str ) {
244
252
self . tcx . sess . span_warn_with_code (
245
253
span,
246
- msg,
254
+ msg. to_string ( ) ,
247
255
DiagnosticId :: Lint {
248
256
name : String :: from ( "creusot" ) ,
249
257
has_future_breakage : false ,
You can’t perform that action at this time.
0 commit comments