Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reports with non-static labels #53

Open
NViviers opened this issue Nov 30, 2022 · 0 comments
Open

Reports with non-static labels #53

NViviers opened this issue Nov 30, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@NViviers
Copy link

NViviers commented Nov 30, 2022

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

@zesterer zesterer added the bug Something isn't working label Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants