about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-03-25 01:26:34 +0800
committerGitHub <noreply@github.com>2018-03-25 01:26:34 +0800
commite2b89221f1fb3384ee707cef4bb78ab7fb6296ac (patch)
tree42f50f0781c95afe4f1ee4d41c3a31c33828df01 /src/liballoc
parent311814a1a963247df61a2725150a2f3fb37218df (diff)
parent57896abc38f56dce27ca9d4642c18f44be8db620 (diff)
downloadrust-e2b89221f1fb3384ee707cef4bb78ab7fb6296ac.tar.gz
rust-e2b89221f1fb3384ee707cef4bb78ab7fb6296ac.zip
Rollup merge of #49194 - Zoxc:unsafe-generator, r=cramertj
Make resuming generators unsafe instead of the creation of immovable generators

cc @withoutboats

Fixes #47787
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index abe2071973b..bfd806f99e7 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -892,7 +892,7 @@ impl<T> Generator for Box<T>
 {
     type Yield = T::Yield;
     type Return = T::Return;
-    fn resume(&mut self) -> GeneratorState<Self::Yield, Self::Return> {
+    unsafe fn resume(&mut self) -> GeneratorState<Self::Yield, Self::Return> {
         (**self).resume()
     }
 }