diff options
| author | Guillaume Boisseau <Nadrieril@users.noreply.github.com> | 2024-02-07 18:24:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-07 18:24:46 +0100 |
| commit | b715d9303e77dfae291c7d651c8e65f8eec94b93 (patch) | |
| tree | 5eec8cffe4b00871ca1101409ddca7249e3cab54 /tests | |
| parent | cb040f5ded0d94db3f6a1a0d32759a25ea48f8b1 (diff) | |
| parent | dcca9a12cdda3be34ed74beca05d72c77d797e7f (diff) | |
| download | rust-b715d9303e77dfae291c7d651c8e65f8eec94b93.tar.gz rust-b715d9303e77dfae291c7d651c8e65f8eec94b93.zip | |
Rollup merge of #120746 - compiler-errors:kind-ty, r=oli-obk
Record coroutine kind in coroutine generics Oops, added a new substitution (the "kind" ty) to coroutines but forgot to record it in the `generics_of`. I'm surprised I left this out of the coroutine-closure PR -- I thought I made this change; I possibly rebased it out by accident. Fixes #120732 r? oli-obk
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/coroutine/polymorphize-args.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/coroutine/polymorphize-args.rs b/tests/ui/coroutine/polymorphize-args.rs new file mode 100644 index 00000000000..de44d667656 --- /dev/null +++ b/tests/ui/coroutine/polymorphize-args.rs @@ -0,0 +1,17 @@ +// compile-flags: -Zpolymorphize=on +// build-pass + +#![feature(coroutines, coroutine_trait)] + +use std::ops::Coroutine; +use std::pin::Pin; +use std::thread; + +fn main() { + let mut foo = || yield; + thread::spawn(move || match Pin::new(&mut foo).resume(()) { + s => panic!("bad state: {:?}", s), + }) + .join() + .unwrap(); +} |
