diff options
| author | Eric Holk <ericholk@microsoft.com> | 2021-10-08 15:09:20 -0700 |
|---|---|---|
| committer | Eric Holk <ericholk@microsoft.com> | 2022-01-18 14:25:23 -0800 |
| commit | 4be32f896a7fc7e9db8b92132b147870bd57bc9b (patch) | |
| tree | 837d5e699cb8a3641267e2330dfde5e0620d87bc | |
| parent | 9ad5d82f822b3cb67637f11be2e65c5662b66ec0 (diff) | |
| download | rust-4be32f896a7fc7e9db8b92132b147870bd57bc9b.tar.gz rust-4be32f896a7fc7e9db8b92132b147870bd57bc9b.zip | |
Add test case for #57478
| -rw-r--r-- | src/test/ui/generator/issue-57478.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/generator/issue-57478.rs b/src/test/ui/generator/issue-57478.rs new file mode 100644 index 00000000000..592632cd351 --- /dev/null +++ b/src/test/ui/generator/issue-57478.rs @@ -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) {} |
