Skip to content

Commit

Permalink
Add test case for rust-lang#57478
Browse files Browse the repository at this point in the history
  • Loading branch information
eholk committed Jan 18, 2022
1 parent 9ad5d82 commit 4be32f8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/ui/generator/issue-57478.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#![feature(negative_impls, generators)]

struct Foo;
impl !Send for Foo {}

fn main() {
assert_send(|| {
let guard = Foo;
drop(guard);
yield;
})
}

fn assert_send<T: Send>(_: T) {}

0 comments on commit 4be32f8

Please sign in to comment.