ariadne
ariadne copied to clipboard
Reports with non-static labels
New to this crate, so not sure if I'm simply doing something wrong but it seems like you can't build reports with non-static values:
Report::build(ReportKind::Error, ...)
.with_message(...)
with_label(Label::new((data.file.as_str(), span)))
data.file
is a String
instance, my main function calls another function passing data
which then builds the report. Borrowed data
either escapes the function body or doesn't outlive 'static as required