diff options
| author | Matthias Einwag <matthias.einwag@live.com> | 2019-02-05 01:30:00 -0800 |
|---|---|---|
| committer | Matthias Einwag <matthias.einwag@live.com> | 2019-02-05 01:30:00 -0800 |
| commit | 363e992b9885e2ce55b389ab274f9cd88598104d (patch) | |
| tree | 9c1480c1208d098fe29b97fea8fe15cf2dc581e5 /src/libcore/task | |
| parent | e1ec81459da4ba8e0633d90ddf440522a1587f35 (diff) | |
| download | rust-363e992b9885e2ce55b389ab274f9cd88598104d.tar.gz rust-363e992b9885e2ce55b389ab274f9cd88598104d.zip | |
review suggestions
Diffstat (limited to 'src/libcore/task')
| -rw-r--r-- | src/libcore/task/wake.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcore/task/wake.rs b/src/libcore/task/wake.rs index 1f42d3e2690..a877e033bc6 100644 --- a/src/libcore/task/wake.rs +++ b/src/libcore/task/wake.rs @@ -29,6 +29,11 @@ pub struct RawWaker { /// /// The pointer passed to all functions inside the vtable is the `data` pointer /// from the enclosing [`RawWaker`] object. +/// +/// The functions inside this struct are only intended be called on the `data` +/// pointer of a properly constructed [`RawWaker`] object from inside the +/// [`RawWaker`] implementation. Calling one of the contained functions using +/// any other `data` pointer will cause undefined behavior. #[derive(PartialEq, Copy, Clone, Debug)] pub struct RawWakerVTable { /// This function will be called when the [`RawWaker`] gets cloned, e.g. when |
