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

Add lifetime bounds to nested references #38

Merged
merged 4 commits into from
Mar 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add failing test
dcchut committed Mar 17, 2024
commit e49a064ee60eec163de0d0861e5a0fa1bfd7f12b
6 changes: 6 additions & 0 deletions tests/lifetimes.rs
Original file line number Diff line number Diff line change
@@ -34,6 +34,12 @@ async fn contains_value_2<'a, 'b, T: PartialEq>(value: &'b T, node: &'b Node<'a,
contains_value(value, node).await
}

// The reference inside foo needs a `async_recursion bound
#[async_recursion]
async fn count_down(foo: Option<&str>) {
let _ = foo;
}

#[test]
fn lifetime_expansion_works() {
block_on(async move {