Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
lifetimes for those slices changed to 'static
  • Loading branch information
floriangru committed Jul 6, 2023
1 parent 1247793 commit 56096e4
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions creusot/src/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,25 +225,33 @@ impl<'tcx, 'sess> TranslationCtx<'tcx> {
}

pub(crate) fn crash_and_error(&self, span: Span, msg: &str) -> ! {
self.tcx.sess.span_fatal_with_code(span, msg, DiagnosticId::Error(String::from("creusot")))
self.tcx.sess.span_fatal_with_code(
span,
msg.to_string(),
DiagnosticId::Error(String::from("creusot")),
)
}

pub(crate) fn fatal_error(&self, span: Span, msg: &str) -> DiagnosticBuilder<'tcx, !> {
self.tcx.sess.struct_span_fatal_with_code(
span,
msg,
msg.to_string(),
DiagnosticId::Error(String::from("creusot")),
)
}

pub(crate) fn error(&self, span: Span, msg: &str) {
self.tcx.sess.span_err_with_code(span, msg, DiagnosticId::Error(String::from("creusot")))
self.tcx.sess.span_err_with_code(
span,
msg.to_string(),
DiagnosticId::Error(String::from("creusot")),
)
}

pub(crate) fn warn(&self, span: Span, msg: &str) {
self.tcx.sess.span_warn_with_code(
span,
msg,
msg.to_string(),
DiagnosticId::Lint {
name: String::from("creusot"),
has_future_breakage: false,
Expand Down

0 comments on commit 56096e4

Please sign in to comment.