diff options
| author | Josef Reinhard Brandl <mail@josefbrandl.de> | 2018-06-30 21:16:44 +0200 |
|---|---|---|
| committer | Josef Reinhard Brandl <mail@josefbrandl.de> | 2018-07-02 13:59:40 +0200 |
| commit | d8bf2223672973f9d86f6c173793bcfce7890cd8 (patch) | |
| tree | 641557daeb359a6b32a1b2eca7af0bded0b80b96 /src/libcore/task/executor.rs | |
| parent | 9f70e7fe3c4126bf8390a78e4740ade3261ac4df (diff) | |
| download | rust-d8bf2223672973f9d86f6c173793bcfce7890cd8.tar.gz rust-d8bf2223672973f9d86f6c173793bcfce7890cd8.zip | |
Add lifetime to `FutureObj`
Diffstat (limited to 'src/libcore/task/executor.rs')
| -rw-r--r-- | src/libcore/task/executor.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/task/executor.rs b/src/libcore/task/executor.rs index 55ea5e724c1..f1db5093e98 100644 --- a/src/libcore/task/executor.rs +++ b/src/libcore/task/executor.rs @@ -13,7 +13,7 @@ issue = "50547")] use fmt; -use super::{FutureObj, LocalFutureObj}; +use future::{FutureObj, LocalFutureObj}; /// A task executor. /// @@ -29,7 +29,7 @@ pub trait Executor { /// /// The executor may be unable to spawn tasks, either because it has /// been shut down or is resource-constrained. - fn spawn_obj(&mut self, task: FutureObj<()>) -> Result<(), SpawnObjError>; + fn spawn_obj(&mut self, task: FutureObj<'static, ()>) -> Result<(), SpawnObjError>; /// Determine whether the executor is able to spawn new tasks. /// @@ -76,7 +76,7 @@ pub struct SpawnObjError { pub kind: SpawnErrorKind, /// The task for which spawning was attempted - pub task: FutureObj<()>, + pub task: FutureObj<'static, ()>, } /// The result of a failed spawn @@ -86,5 +86,5 @@ pub struct SpawnLocalObjError { pub kind: SpawnErrorKind, /// The task for which spawning was attempted - pub task: LocalFutureObj<()>, + pub task: LocalFutureObj<'static, ()>, } |
