Skip to content

Commit 56096e4

Browse files
committed
lifetimes for those slices changed to 'static
1 parent 1247793 commit 56096e4

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

creusot/src/ctx.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,25 +225,33 @@ impl<'tcx, 'sess> TranslationCtx<'tcx> {
225225
}
226226

227227
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+
)
229233
}
230234

231235
pub(crate) fn fatal_error(&self, span: Span, msg: &str) -> DiagnosticBuilder<'tcx, !> {
232236
self.tcx.sess.struct_span_fatal_with_code(
233237
span,
234-
msg,
238+
msg.to_string(),
235239
DiagnosticId::Error(String::from("creusot")),
236240
)
237241
}
238242

239243
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+
)
241249
}
242250

243251
pub(crate) fn warn(&self, span: Span, msg: &str) {
244252
self.tcx.sess.span_warn_with_code(
245253
span,
246-
msg,
254+
msg.to_string(),
247255
DiagnosticId::Lint {
248256
name: String::from("creusot"),
249257
has_future_breakage: false,

0 commit comments

Comments
 (0)