Open NViviers opened 1 year ago
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
data.file
String
data
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:
data.file
is aString
instance, my main function calls another function passingdata
which then builds the report. Borroweddata
either escapes the function body or doesn't outlive 'static as required