Skip to content
New issue

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

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

Already on GitHub? # to your account

remove incorrect lifetime annotation #125

Merged
merged 1 commit into from
Aug 16, 2022
Merged

Conversation

aliemjay
Copy link
Contributor

Hi,
rustc was previously accepting this incorrect code:

async fn test<'a>() { // `'a`, being a lifetime parameter, must be longer than the entire function body
    let f = |_: &'a str| {}; // the argument is required to outlive `'a`
    f(&String::new()); // an argument of shorter lifetime is passed!
}

This got fixed in the current beta 1.64, but we found that wonnx relies on this bug. This PR tries to fix this.

@haixuanTao haixuanTao merged commit 841967e into webonnx:master Aug 16, 2022
@haixuanTao
Copy link
Collaborator

Thank you ❤️

@pixelspark
Copy link
Collaborator

Good catch, looks like that was my code 😬

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants