about summary refs log tree commit diff
path: root/example/std_example.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-04-18 15:42:49 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2020-04-18 15:45:42 +0200
commiteab4c9063ec63bf484347cbd6b21117d336db4a5 (patch)
treee71172dd5840de1ca9448a3076c1a97c9e37d8f0 /example/std_example.rs
parenta802c7f2927cceb6bc87bf456bd9bee472218e27 (diff)
downloadrust-eab4c9063ec63bf484347cbd6b21117d336db4a5.tar.gz
rust-eab4c9063ec63bf484347cbd6b21117d336db4a5.zip
Sync fn_sig_for_fn_abi with upstream for generator resume args
Fixes #970
Diffstat (limited to 'example/std_example.rs')
-rw-r--r--example/std_example.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/example/std_example.rs b/example/std_example.rs
index baf9a9c526e..d7e8cf73ea8 100644
--- a/example/std_example.rs
+++ b/example/std_example.rs
@@ -1,8 +1,8 @@
-#![feature(core_intrinsics)]
-#![feature(is_sorted)]
+#![feature(core_intrinsics, generators, generator_trait, is_sorted)]
 
 use std::arch::x86_64::*;
 use std::io::Write;
+use std::ops::Generator;
 
 fn main() {
     let mutex = std::sync::Mutex::new(());
@@ -89,6 +89,10 @@ fn main() {
     unsafe {
         test_simd();
     }
+
+    Box::pin(move |mut _task_context| {
+        yield ();
+    }).as_mut().resume(0);
 }
 
 #[target_feature(enable = "sse2")]