Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

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 😬

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants